home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Mousetools / MachIV / MachIV.doc < prev    next >
Text File  |  1996-09-26  |  112KB  |  2,949 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.                            User's Manual
  13.  
  14.                                 for
  15.  
  16.                          MachIV Version 4.0
  17.  
  18.                                 and
  19.  
  20.                        SetMachIV Version 4.0
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.                  Copyright 1987-1992 by Brian Moats
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34. MachIV and SetMachIV and this documentation are Copyright 1987-1992
  35. by Brian Moats. Lawful users of these programs are hereby licensed
  36. only to read the programs, from their media into the memory of a
  37. computer, solely for the purpose of executing the programs.
  38. Duplicating or copying for purposes other than backup is forbidden.
  39. This manual, or parts thereof, may not be reproduced in any form
  40. without the written permission by Brian Moats and Polyglot Software.
  41.  
  42.  
  43.  
  44. Disclaimer
  45.  
  46. This product is sold "as is" without representation or warranty of
  47. any kind, either expressed or implied. The user assumes all risks and
  48. responsibilities related to its use.
  49.  
  50.  
  51.  
  52.  
  53. Information And Technical Support
  54.  
  55.                         Polyglot Software
  56.                         884 W. Melrose Ln
  57.                         Boise, ID  83706
  58.  
  59.                         (208) 336-4583
  60.  
  61.  
  62.                         Table of Contents
  63.  
  64.  
  65. Introduction...............................................1
  66.        The Sample Hotkeys..................................1
  67.        Terms Used..........................................2
  68.  
  69. Chapter 1
  70.    Usage...................................................3
  71.        Starting MachIV.....................................3
  72.        Terminating MachIV..................................4
  73.        Running SetMachIV...................................4
  74.        Loading MachIV.prefs................................4
  75.        SetMachIV's Gadgets.................................5
  76.        SetMachIV's Display.................................5
  77.  
  78. Chapter 2
  79.    Mouse Features..........................................6
  80.        Mouse Accelerator...................................6
  81.        Mouse Off...........................................6
  82.        SunMouse............................................6
  83.        Key Activate........................................6
  84.        Window Cycling......................................7
  85.        Click To Front......................................7
  86.        Mouse To Menu.......................................7
  87.        Playback Delay......................................7
  88.        Middle Mouse Button.................................7
  89.  
  90. Chapter 3
  91.    Clock Features..........................................8
  92.        Clock Displays......................................8
  93.        Clock To Top Window.................................9
  94.        Clock To Top Screen.................................9
  95.        Online Meter........................................9
  96.        Alarm...............................................9
  97.        Low Memory Warning..................................9
  98.        Alternating Date and Memory Display.................10
  99.        Clock On and Off....................................10
  100.        Clock Position......................................10
  101.        Clock Float.........................................10
  102.        Horizontal and Vertical Clocks......................10
  103.        12 and 24 Hour Time.................................11
  104.        Clock Font..........................................11
  105.        Date Format.........................................11
  106.  
  107. Chapter 4
  108.    Macros..................................................12
  109.        Recording Macros....................................13
  110.        Executing Macros....................................14
  111.        Correcting Mistakes.................................14
  112.        Aborting Execution..................................14
  113.        Clearing a Macro....................................14
  114.        Accidents Happen!...................................14
  115.  
  116.  
  117. Chapter 5
  118.    Using SetmachIV and Macros..............................15
  119.        Changing The Current Hotkey.........................15
  120.        Selecting By Name...................................16
  121.        Modifying Macros....................................16
  122.        Copying and Appending...............................16
  123.          To a Named Macro..................................17
  124.          To Another Configuration..........................17
  125.        Add Macro...........................................17
  126.        Del Macro...........................................17
  127.        Maximum Macro Size..................................17
  128.        Help................................................18
  129.        Flags...............................................18
  130.        Sorting.............................................19
  131.        Printing Your Macros................................19
  132.  
  133. Chapter 6
  134.    More About Macros.......................................20
  135.        ARexx Support.......................................20
  136.        Viewing a Macro.....................................20
  137.        Recording Mouse Button Clicks.......................20
  138.        Recording All Moves.................................21
  139.        Recording Menu and Gadget Selections................21
  140.        Final Notes on Recording............................21
  141.        Using Escaped Characters............................22
  142.        Functions in Macros.................................22
  143.        Windows Functions - WIN_............................23
  144.        Activating..........................................23
  145.        Depth Arranging.....................................23
  146.        Moving and Sizing...................................23
  147.        Organizing Windows..................................24
  148.        Zooming Windows.....................................24
  149.        Closing Windows.....................................25
  150.        Sending IDCMP Messages..............................25
  151.        Window Message Examples.............................26
  152.        Window Selecting....................................26
  153.        Screen Functions - SCR_.............................26
  154.        Pausing Within a Macro - PAU_.......................27
  155.        Graphics Functions - GFX_...........................28
  156.        Executing Functions - EXE_..........................28
  157.        Auto Execution Based On Time........................28
  158.        Executing Programs..................................30
  159.        Using Templates - MAC_FINISH........................30
  160.        Miscellaneous Functions - MSC_......................31
  161.        Changing Directories................................31
  162.        Changing Priorities Within a Macro..................31
  163.        Text Functions - TXT_...............................31
  164.        Sending Date and Time...............................31
  165.        Identifying Labels and Comments.....................31
  166.        The Set Functions - SET_............................32
  167.        Clipboard Functions - CLP_..........................33
  168.  
  169.  
  170. Chapter 7
  171.    Configurations..........................................35
  172.        Changing Configurations.............................35
  173.        Default Configuration...............................36
  174.        Windows and Screens With No Title...................36
  175.        Attaching to the Program's Name.....................36
  176.        Adding and Deleting.................................36
  177.        Loading and Saving..................................37
  178.        The Settings File...................................37
  179. Chapter 8
  180.    Miscellaneous Features..................................38
  181.        Priorities..........................................38
  182.        Screen Blanking.....................................38
  183.        Macro Screen Blanking...............................38
  184.        Suspend.............................................39
  185.        Remove..............................................39
  186.        Check Waltz.........................................39
  187.        No Caps Lock........................................39
  188.        Beeping.............................................39
  189.        Hold Qualifiers.....................................40
  190.        Debug...............................................40
  191.  
  192. Appendix A
  193.     Special Functions......................................41
  194.  
  195. Appendix B
  196.     Escaped Characters.....................................47
  197.  
  198. Appendix C
  199.     Common Questions.......................................48
  200.  
  201. Appendix D
  202.     Graphic Print Options..................................50
  203.  
  204. Appendix E
  205.     Some Useful Macros.....................................51
  206.  
  207.  
  208.                                 - 1 -
  209.  
  210.  
  211.                                                          Introduction
  212. =====================================================================
  213.  
  214.  
  215. MachIV is a utility program that provides hotkeys and many other
  216. optional features for both shell and Workbench users. All options and
  217. hotkeys may be changed at any time with SetMachIV. You may have
  218. different hotkeys and settings for each window or screen.
  219.  
  220. MachIV gives you the ability to do things like: press a key and have
  221. all open window titles displayed in a scrollable list. You can then
  222. select one and have it brought to the front, closed or anything else
  223. that you can think of.
  224.  
  225. Programs can be launched from hotkeys or executed at a specific time
  226. and date. Windows and screens can be manipulated from the keyboard.
  227.  
  228. Keystrokes and mouse movements may be recorded and played back at the
  229. touch of a key.
  230.  
  231. Commonly used words and phrases may be typed for you by using a macro
  232. finish function. (See Using Templates in Chapter 6.)
  233.  
  234. You can quickly view the contents of the clipboard. The contents may
  235. be pasted (even to windows that do not support the clipboard) or
  236. printed. When pasting, you may have an append and prepend string
  237. applied to each line and you may set a character and line delay.
  238.  
  239. SetMachIV is a separate program that is used to change all options
  240. and to edit macros.
  241.  
  242. Both MachIV and SetMachIV require Workbench 2.04 or higher.
  243.  
  244. IMPORTANT: All hotkeys referred to in this documentation are included
  245. in the sample MachIV.prefs file. In order to do the examples, MachIV
  246. needs to load this settings file. You may change the hotkeys later.
  247.  
  248. The Sample Hotkeys
  249. ------------------
  250.  
  251.          Left-Amiga-J            Window to front. ('J'ump forward)
  252.          Right-Amiga-K           Window to back.  ('K'ick back)
  253.          Left-Amiga-N            Screen to front and activate window.
  254.          Right-Amiga-M           Screen to back and activate window.
  255.          Left-Amiga-ESC          Create a new shell.
  256.          Alt-ESC                 Start or stop macro recording.
  257.          Ctrl-Alt-ESC            Start or stop named macro recording.
  258.          Ctrl-Left-Amiga-ESC     Run SetMachIV.
  259.          Ctrl-Left-Amiga-B       Blank the screen.
  260.          Ctrl-Left-Amiga-N       Execute a named macro.
  261.          Alt-Help                Display a macro.
  262.          Ctrl-Left-Amiga-V       View the clipboard.
  263.  
  264. Note: MachIV.020 and SetMachIV.020 have been optimized for the 68020
  265.       and 68030 processor chips. If you use these, you could rename
  266.       MachIV.020 to MachIV and you should rename SetMachIV.020.
  267.  
  268.                                 - 2 -
  269.  
  270. Terms Used Throughout This Documentation
  271. ========================================
  272.  
  273. Qualifiers
  274. ----------
  275.  
  276. "Qualifiers" mean the keys Ctrl, Shift, Alt, Left-Amiga (C=), and
  277. Right-Amiga.
  278.  
  279. Hotkey
  280. ------
  281.  
  282. The term "hotkey" means any other key pressed in combination with
  283. zero or more qualifiers.
  284.  
  285. Macro
  286. -----
  287.  
  288. "Macro" means the quoted string of characters that are sent as
  289. keystrokes, the special functions that are to perform some particular
  290. action, or a combination of these. A macro may be attached to a
  291. hotkey or to no key at all. A single key may have up to 32 macros
  292. attached to it, each with a unique qualifier combination. For
  293. example, F1 may have a macro and so may Ctrl-F1, Ctrl-Alt-F1,
  294. Shift-F1 etc.
  295.  
  296. A macro that is not attached to a hotkey is usually executed by its
  297. name or automatically executed at some specified time.
  298.  
  299. Macro Name
  300. ----------
  301.  
  302. Any macro may have a name. The name may be used to describe the
  303. purpose of the macro or it may be a short term that you may enter
  304. when executing a macro by its name.
  305.  
  306. Some names have special significance. A macro named "Blank" will be
  307. executed when screen blanking would occur. "Unblank" will be executed
  308. if a "Blank" macro was executed and the mouse is moved or a key is
  309. pressed.
  310.  
  311. A macro name MachIVQuit will execute when MachIV is terminated.
  312.  
  313. If you have multiple configurations, a macro whose name matches the
  314. configuration name will be executed when that configuration becomes
  315. active.
  316.  
  317. These special feature are explained more fully in Chapter 6.
  318.  
  319. CLI and Shell
  320. -------------
  321.  
  322. These are used interchangably. They mean the system window that you
  323. use to issue commands like: dir, info, list, copy, date etc.
  324.  
  325.                                 - 3 -
  326.  
  327. Chapter 1                                                       Usage
  328. =====================================================================
  329.  
  330. Starting MachIV
  331. ===============
  332.  
  333. You can start MachIV by double clicking on its icon, by putting it in
  334. the WBStartup drawer, by entering in your startup-sequence "Run >nil:
  335. MachIV" or typing from the shell the same command.
  336.  
  337. You may follow the command with the settings file to load.
  338. For example:
  339.  
  340.    Run >nil: MachIV ENVARC:MachIV/MachIV.prefs
  341.  
  342.    or
  343.  
  344.    Run >nil: MachIV sys:configs/SpecialMachIV.prefs
  345.  
  346. Entering it in your startup-sequence (or User-Startup) file is the
  347. preferred method as then MachIV will inherit the current path and
  348. stack size. This can important when executing programs from MachIV
  349. such as NewShell.
  350.  
  351. For example, you may use something like:
  352.  
  353.       Path sys:utilities sys:tools sys:prefs add
  354.       Stack 10000
  355.       Run >nil: MachIV
  356.       LoadWb
  357.       Endcli <nil: >nil:
  358.  
  359. When you run MachIV with no file name to load as a settings file, it
  360. automatically attempts to load MachIV.prefs from the current
  361. directory. Failing that, it tries ENVARC:MachIV/MachIV.prefs.
  362.  
  363. If it still cannot locate the file, it will use some default setting,
  364. but there WILL BE NO MACROS! In this case, you should cancel the
  365. "MachIV.prefs Not Found" and "Using Defaults" requesters. You should
  366. then  use SetMachIV to load MachIV.prefs using the "Project" menu
  367. selection "Open...".
  368.  
  369. The settings file may also be entered in the Tool Types gadget in the
  370. icon. Use:
  371.  
  372.   SETTINGS=path/filename.prefs
  373.  
  374. After MachIV is running, the only obvious indication of MachIV's
  375. presence is the (optional) title bar clock. The real power of MachIV
  376. is lying in the background waiting to assist you. Exactly what it can
  377. do will depend on your settings file.
  378.  
  379.                                 - 4 -
  380.  
  381. Terminating MachIV
  382. ==================
  383.  
  384. There are several ways to remove MachIV.
  385.  
  386. 1. Double click on its icon.
  387. 2. Type MachIV in a shell.
  388. 3. Issue a "Break" command.
  389. 4. Activate the clock and press Ctrl-C.
  390. 5. In the "Miscellaneous Features" window of SetMachIV, click on
  391.    "Remove MachIV".
  392. 6. Execute a MSC_QUIT macro.
  393.  
  394. Running SetMachIV
  395. =================
  396.  
  397. There are (at least) five ways to run SetMachIV.
  398.  
  399. 1. The easiest is to activate the clock and press the right mouse
  400.    button.
  401.  
  402. 2. You may use the hotkey Ctrl-Left-Amiga-ESC, which has EXE_SETMACH
  403.    as its macro.
  404.  
  405. 3. Simply type SetMachIV in your shell window.
  406.  
  407. 4. Double click on SetMachIV's icon.
  408.  
  409. 5. Execute an EXE_CMD"SetMachIV" macro.
  410.  
  411. Method 1 and 2 are preferred because MachIV will signal SetMachIV to
  412. move to the front immediately if it is already running, while
  413. EXE_CMD"SetMachIV" must load SetMachIV from the disk. These macros
  414. and hotkeys are explained in a later chapter.
  415.  
  416. NOTE: MachIV searches for a program named SetMachIV in the path as it
  417.       was set when MachIV was first run. If you want to use
  418.       SetMachIV.020, you should rename it to SetMachIV. You could also
  419.       specify the name and path in a macro using the function
  420.       SET_SETMACHIV_PATH"path/name". That will be explained later.
  421.  
  422. Loading MachIV.prefs
  423. ====================
  424.  
  425. MachIV.prefs is a text file that contains all your settings and macros.
  426. It is loaded when MachIV is first run. If MachIV is unable to find
  427. the file, you can load it using SetMachIV. To do this, run MachIV and
  428. then run SetMachIV using one of the methods described above. From
  429. SetMachIV's Project menu select "Open..." and pick the MachIV.prefs
  430. file from the file requester.
  431.  
  432.                                 - 5 -
  433.  
  434. SetMachIV's Gadgets
  435. ===================
  436.  
  437. The string gadgets in the windows are initially inactive - you may
  438. activate them either by clicking in them or by pressing the TAB key.
  439. Successive pressing will activate the other string gadgets.
  440.  
  441. Some gadgets have a letter underlined. Pressing that letter will have
  442. the same effect as clicking on the gadget. Note that this will not
  443. happen if a string gadget is active.
  444.  
  445. Pressing the up and down arrow keys has the same effect as clicking
  446. on the up and down gadgets located under the current hotkey text.
  447.  
  448. SetMachIV's Display
  449. ===================
  450.  
  451. SetMachIV may open its main window on the Workbench screen or on a
  452. custom interlaced or non-interlaced screen. If desired, the custom
  453. screen may scroll up from the bottom.
  454.  
  455. All of these settings may be set from the "Preferences" menu. The
  456. change will take affect immediately. If you want it to always open
  457. the way that you have selected, save from the "Project" menu's
  458. "Save" or "Save As..." menu items.
  459.  
  460.  
  461.  
  462.                                 - 6 -
  463.  
  464. Chapter 2                                              Mouse Features
  465. =====================================================================
  466.  
  467. All mouse features are adjusted or toggled on or off in the "Mouse
  468. Features" section of SetMachIV. Some features may also be modified
  469. with macros.
  470.  
  471. To open the "Mouse Features" window, click on the "Mouse Features"
  472. gadget or press "M".
  473.  
  474. Mouse Accelerator
  475. =================
  476.  
  477. Move the mouse. Notice how much quicker it moves? Both speed and
  478. sensitivity are adjustable. "Speed" is an acceleration factor applied
  479. to mouse movements. The "Threshold" adjusts the sensitivity of the
  480. mouse (how soon it kicks in). Low values decrease the sensitivity.
  481. Set "Speed" to 0 to disable the accelerator. While you can set the
  482. speed and acceleration in the Prefs/Input program, MachIV has a
  483. little more flexibility plus you can use negative values for the
  484. speed to slow it down. This is sometimes useful for fine control in
  485. painting programs. The speed may also be set by using the macro
  486. function MOU_SPEED"nn".
  487.  
  488. Mouse Off
  489. =========
  490.  
  491. Press a key. Notice that the mouse disappeared? When you move the
  492. mouse, it reappears. MachIV assumes that if you are typing you do not
  493. want the mouse in the way. It will also turn the mouse off after 5
  494. seconds of inactivity. This time delay is adjustable in SetMachIV
  495. with "Mouse Off Delay" or with MOU_OFF"nn" in a macro, where nn
  496. equals the number of delay seconds. Set "Mouse Off Delay" to 0 to
  497. disable this feature.
  498.  
  499. SunMouse
  500. ========
  501.  
  502. Now move the mouse into another window. The window under the mouse
  503. automatically becomes the active window. This is called "SunMouse",
  504. named for the way in which mice behave on Sun workstations. To
  505. prevent windows that the mouse is merely passing over from becoming
  506. active, a window is not activated until the mouse comes to a stop.
  507. This is different from the Commodities program "AutoPoint".
  508. The "SunMouse" may be toggled on and off with MOU_SUN in a macro.
  509.  
  510. Key Activate
  511. ============
  512.  
  513. Instead of using the "SunMouse" feature, you may activate the window
  514. that is under the mouse by pressing a key.
  515.  
  516.                                 - 7 -
  517.  
  518. Window Cycling
  519. ==============
  520.  
  521. If you have more than one window open, place them so that one is
  522. behind the other. Now with the mouse over the top window, press and
  523. hold the left button and press and release the right button. The top
  524. window will move to the back. This is called "Window Cycling". If the
  525. mouse is over a "backdrop" window, the only window on the screen or
  526. no window, the screen will be sent to the back.
  527.  
  528. Click To Front
  529. ==============
  530.  
  531. Now place a window behind another so that you can see just part of
  532. it. Move the mouse into this area and click quickly three times. That
  533. window should now be the top window. This is the "N Click" feature
  534. where N is the number of clicks required and may be set from 0 to 4.
  535.  
  536. Mouse To Menu
  537. =============
  538.  
  539. When this feature is on, every time you press the right mouse button
  540. the pointer will jump to the menu bar. When you release the button
  541. it will return to where it was. With this option selected, you will
  542. also get "menu wrap-around". When the mouse moves to the right of the
  543. menu, it will wrap around to the left side. Whn you move to the left
  544. of the first menu, the mouse will move to the right item. "Mouse To
  545. Menu" may be toggled on and off with MOU_TO_MENU in a macro.
  546.  
  547. Play Delay
  548. ==========
  549.  
  550. When recording and playing back mouse movements, you may set a delay
  551. in this gadget. The values are in 50ths of a second. See Chapter 6,
  552. for more information.
  553.  
  554. Middle Mouse Button
  555. ===================
  556.  
  557. Some third party mice have a middle button that may be put to good
  558. use. While most prefer to have the middle button behave like the
  559. shift key, it can function as any key that you want. To do this
  560. requires the executing of a special function in a macro. This is
  561. explained more fully in Chapter 6, but to simply convert the middle
  562. button to the shift key execute this macro:
  563.  
  564.   SET_KEY"\MM,\S"
  565.  
  566. This could also be an auto-executing macro which executes when MachIV
  567. is first run:
  568.  
  569.   EXE_AUTO"" SET_KEY"\MM,\S"
  570.  
  571.                                 - 8 -
  572.  
  573. Chapter 3                                              Clock Features
  574. =====================================================================
  575.  
  576. To open the "Clock Features" window, click on the "Clock Features"
  577. gadget or press the letter "L".
  578.  
  579. There is a wide variety of clocks to choose from. Cycle through them
  580. by clicking on the "Clock+Memory", "Memory Only", "Clock+Date",
  581. "Clock Only" and "Coordinates" gadget. These are shown below. If you
  582. select "Clock+Memory" or "Memory Only", and if you do not have any
  583. "Fast" memory, the clock will just show "Mem". "Coordinates" shows only
  584. the X and Y position of the mouse in the active window.
  585.  
  586. You may also change the clock type and orientation (vertical or
  587. horizontal) by activating the clock with the mouse and pressing the
  588. keys "1" to "5" and "H" or "V".
  589.  
  590. Clock Displays
  591. ==============
  592.  
  593.                      Clock+Memory
  594.             ------------------------------
  595.             | Chip 456 Fast 357  4:32:45 |
  596.             ------------------------------
  597.  
  598.                      Memory Only
  599.                 ---------------------
  600.                 | Chip 456 Fast 357 |
  601.                 ---------------------
  602.  
  603.                      Clock+Date
  604.                  -------------------
  605.                  | 8-01-90 4:32:45 |
  606.                  -------------------
  607.  
  608.                      Clock Only
  609.                     -----------
  610.                     | 4:32:45 |
  611.                     -----------
  612.  
  613.                      Clock+Memory (No fast memory)
  614.                 ---------------------
  615.                 | Mem   456 4:32:45 |
  616.                 ---------------------
  617.  
  618.                     Coordinates
  619.                     ----------
  620.                     |XXX  YYY|
  621.                     ----------
  622.  
  623. Besides showing time and memory, the clock also displays many helpful
  624. messages such as "Select Hotkey...", "Recording Macro...", "Executing
  625. Macro..." and "Macro Aborted!".
  626.  
  627.                                 - 9 -
  628.  
  629. Clock To Top Window
  630. ===================
  631.  
  632. You may select to have the clock pop to the top or front window by
  633. selecting "PopTop". Selected or not, an invisible depth gadget is
  634. placed on the far right side of the clock (horizontal clocks only).
  635. It functions the same way as a normal depth gadget, the imagery is
  636. just written over by the time text.
  637.  
  638. Clock To Top Screen
  639. ===================
  640.  
  641. The clock may also pop to the top or front screen by having "Top
  642. Screen" selected. This and the "Any Screen" option will place an
  643. invisible screen depth gadget on the left side of the clock.  You may
  644. select "WB Screen" to keep it on the Workbench screen.
  645.  
  646. Note: These must be used with some caution as not all programs work
  647. properly with another window on their screen. Some programs refuse to
  648. close their screen while the clock is on it. Some programs terminate
  649. but leave their screen behind. If you feel adventurous, you can close
  650. a screen that has been left behind with SCR_KILL in a macro. Killing
  651. a screen may cause a system crash if the program owning the screen
  652. expects it to be there.
  653.  
  654. This option also replaces the CloseScreen vector. You may experience
  655. some incompatibility if you, for example, run another program that
  656. also replaces this vector, run MachIV and then terminate the first.
  657. The general rule for running programs that do this is to terminate
  658. them in the reverse order that they were run.
  659.  
  660. Online Meter
  661. ============
  662.  
  663. You may select to have the time portion of your clock keep track of
  664. your online costs by selecting "Meter". Clear your costs with "Meter
  665. Reset". Put the online rate (cents per hour) in the "Rate" gadget.
  666.  
  667. Alarm
  668. =====
  669.  
  670. An alarm may be set in the "Alarm" gadget. Use 24 hour format without
  671. the ":" like "1930" not "19:30". The clock will beep six times when
  672. it goes off. (You can set more alarms in macros with the EXE_AUTO
  673. function. See Chapter 6.)
  674.  
  675. Low Memory Warning
  676. ==================
  677.  
  678. If you would like to be alerted to low memory situations, enter the
  679. memory warning level in the "Low Mem" gadget. When free chip
  680. (graphics) memory drops below this value (in kilobytes), the clock's
  681. text will turn white (or whichever color is set by color number 2).
  682.  
  683.                                 - 10 -
  684.  
  685. Alternating Date And Memory Display
  686. ===================================
  687.  
  688. If you want the clock's display to alternate between memory and time,
  689. and the date, enter the number of seconds to show the memory and time
  690. in the "Date/Time (sec)" gadget.
  691.  
  692. Clock On And Off
  693. ================
  694.  
  695. You may, of course, turn the clock on or off by selecting the "Clock"
  696. gadget.
  697.  
  698. Within a macro, a clock may be turned on with CLK_ON, turned off with
  699. CLK_OFF, toggled on or off with CLK_ON_OFF and sent to the front
  700. screen with CLK_FRONT.
  701.  
  702. Many messages are displayed in the clock. They range from error
  703. messages to prompts.
  704.  
  705. In a macro you can display custom messages with
  706.  
  707.    CLK_CUSTOM_MSG"message"
  708.  
  709. See More About Macros in Chapter 6.
  710.  
  711. These messages may also be spoken by selecting "Speak Messages" in
  712. the "Miscellaneous Features" window. The device "Speak:" must be
  713. mounted.
  714.  
  715. Clock Position
  716. ==============
  717.  
  718. You can change the clock's position by entering the left edge and top
  719. edge in the "Left Edge" and "Top Edge" gadgets. An easier method is
  720. to position the clock with the mouse and then enter a -1 in these
  721. gadgets. The current values will then be entered for you. Turn off
  722. "Float" when doing this.
  723.  
  724. Clock Float
  725. ===========
  726.  
  727. If you are using a virtual Workbench screen (one that is larger than
  728. the display area), the screen can automatically be scrolled with the
  729. mouse. This is a feature of Workbench. The clock would normally
  730. remain in its original position but if you select "Float", the clock
  731. will keep its position relative to the display's left and top edge.
  732.  
  733. Horizontal and Vertical Clocks
  734. ==============================
  735.  
  736. You can select "Vert" or "Horz" to change the clock's orientation. In
  737. some applications users find it convenient to place the clock in the
  738. vertical scroll bar.
  739.  
  740. A vertical clock with an invisible screen depth gadget may be dragged
  741. by carefully positioning the pointer on the upper right corner of the
  742. clock.
  743.  
  744.                                 - 11 -
  745.  
  746. You can also change the orientation by activating the clock with the
  747. mouse and pressing "H" or "V". Most keyboards have these keys in the
  748. same location, but if yours doesn't, you need to press the keys that
  749. are in the same location as on the USA keymap.
  750.  
  751. 12 and 24 Hour Time
  752. ===================
  753.  
  754. Select 12 Hour or 24 Hour to show the desired format.
  755.  
  756. Clock Font
  757. ==========
  758.  
  759. You may select the font for the clock to use by entering it in the
  760. "Clock Font" gadget. Enter the font name (without the .font
  761. extension) and the point size. For example:
  762.  
  763.   Opal 12
  764.  
  765.   or
  766.  
  767.   Diamond 15.
  768.  
  769. If you want to use the default font, enter nothing. The
  770. diskfont.library must be available to use this feature. While only
  771. non-proportional fonts are recommended, MachIV does attempt to
  772. properly size the clock. With proportional fonts there will probably
  773. be part of previous seconds visible on the right edge.
  774.  
  775. This feature is global. That is, it affects all configurations.
  776.  
  777. Date Format
  778. ===========
  779.  
  780. The date is available in four formats selectable in the "Clock
  781. Features" window. As you cycle through these, the date will be
  782. displayed above the gadget. You may also chose your desired separator
  783. character in the adjacent string gadget labeled "Separator".
  784.  
  785. The date format selected will be used in the clock and TXT_DATE_PASTE
  786. and TXT_DATE_PRINT macros functions.
  787.  
  788. These two features may also be changed with the functions
  789. SET_DATE_FORMAT"DOS/INT/USA/CDN" SET_DATE_SEPARATOR"-".
  790.  
  791.                                 - 12 -
  792.  
  793. Chapter 4                                                      Macros
  794. =====================================================================
  795.  
  796.  
  797. The real power of MachIV is its macro ability. A macro may be simply
  798. recorded keystrokes and mouse movements that can be played back. But
  799. they can also perform many window and screen functions, bring up a
  800. list of windows or screens that are open, display the clipboard and
  801. execute other programs.
  802.  
  803. In their simplest form, macros are just strings of keystrokes in
  804. double quotes that are attached to hotkeys. You may, for example,
  805. have a macro that contains the text:
  806.  
  807.   "diskcopy df0: to df1:"
  808.  
  809. When played back, these letters will appear in your active window
  810. just as if you typed them.
  811.  
  812. Besides having letters in macros, you may include any special key by
  813. preceding a letter with a backslash. This is called an escape
  814. character. Some examples:
  815.  
  816.   \F1 is Function key 1
  817.   \E is the ESC key
  818.   \5 is numeric key pad 5
  819.  
  820. These will be entered for you during recording. You can see all of
  821. them by pressing "Help" in SetMachIV. They are also listed in
  822. Appendix B.
  823.  
  824. All special functions have a three letter prefix followed by an
  825. underscore followed by the actual function. For example:
  826.  
  827.   SCR_WB_TO_FRONT        Send the Workbench screen to the front.
  828.   WIN_FRONT_TO_BACK      Send the front window to the back.
  829.  
  830. Some functions require arguments which follow the function and are
  831. enclosed in double quotes. Examples:
  832.  
  833.   EXE_CMD"NewShell"         Create a new shell.
  834.   WIN_ACTIVATE"Workbench"   Activate the Workbench window.
  835.  
  836. These are not case sensitive, CLP_VIEW, Clp_View and clp_view are all
  837. acceptable. In order to tell whether or not a quoted string is an
  838. argument or keystrokes, spaces are not allowed beytween the function
  839. and its arguments. WIN_ACTIVATE"NewShell" is okay but
  840. WIN_ACTIVATE "NewShell" is not.
  841.  
  842. Functions such as these cannot be recorded, they must be entered
  843. using SetMachIV. See Chapter 5, "Using SetMachIV And Macros" to find
  844. out about viewing and modifying macros. There are many more of these
  845. functions listed in Appendix A.
  846.  
  847.                                 - 13 -
  848.  
  849. Recording Macros
  850. ================
  851.  
  852. One of the more important functions is MAC_RECORD_KEYED. This is the
  853. function that starts or stops a recording session. In the sample
  854. MachIV.prefs file, this is attached to the key combination Alt-ESC.
  855. By pressing this, and then pressing the key combination that you want
  856. for the hotkey, you begin a recording session. Press any keys or
  857. mouse buttons that you want recorded and then press Alt-ESC again.
  858. The macro is now ready to be played back.
  859.  
  860. A practice session may help you to understand. To do this, you must
  861. be in a Shell window. You also need a MAC_RECORD_KEYED macro already
  862. setup and attached to Alt-ESC. You should have this already if MachIV
  863. loaded the sample MachIV.prefs file.
  864.  
  865.      Press Alt-ESC    You will hear a beep and the clock will
  866.                       display the message "Select Hotkey..."
  867.  
  868.      Press Alt-D      The clock will display "Recording Macro..."
  869.  
  870.      Now type "dir df0:" without the quotes and press Return.
  871.  
  872.      The directory of the disk in df0: will be displayed.
  873.  
  874.      Now press Alt-ESC again to end recording.
  875.  
  876. You may now press Alt-D and your recorded keystrokes will be played
  877. back.
  878.  
  879. You will also hear a short beep for each keystroke and mouse button
  880. entered during recording.
  881.  
  882. This macro may be viewed with SetMachIV by clicking on "Select
  883. Hotkey" and then pressing Alt-D. The macro should be in the top of
  884. the Macro list box and in the string gadget underneath. You may edit
  885. it if you like or delete all the characters to free the hotkey.
  886.  
  887. Notice that while you did not type the quotes, they appeared in the
  888. macro in SetMachIV. All text that you want played back as keystrokes
  889. must be enclosed in quotes.
  890.  
  891. You may also view the macro by pressing Alt-Help and then Alt-D when
  892. the "Press A Hotkey To Display" window appears. Press Alt-Help again
  893. to close the help window.
  894.  
  895. REMEMBER! All keystrokes in a macro must be enclosed in double
  896.           quotes. If you need to enter double quotes within the
  897.           macro, you must preceed them with a backslash. Example:
  898.  
  899.           "This is a macro with a \" in it."
  900.  
  901. Also note: Some editors (TurboText is one) or word processors may not
  902.            seem to accept played back keystokes immediately. This can
  903.            usually be corrected by setting the "Playback Priority" to
  904.            0 or to whatever the priority is of the appliation.
  905.  
  906.                                 - 14 -
  907. Executing Macros
  908. ================
  909.  
  910. Macros may be executed by simply pressing the hotkey that it is
  911. attached to. In addition, they may be executed by name or at a
  912. specific time and date. See the section Auto Execution Based On Time
  913. in Chapter 6 for time and date execution.
  914.  
  915. In the supplied MachIV.prefs file, there is a function named
  916. MAC_SELECT_NAMED"" attached to Ctrl-Amiga-N. By pressing this, a
  917. window with a scrollable alphabetized list of all macros that have
  918. names will appear. You may select from this list and the macro will
  919. execute.
  920.  
  921. The string gadget below this list will be initially empty and active.
  922. After you have made a selection, the string gadget will be preset
  923. with the previously used named and will be inactive. This allows the
  924. use of "O" and "C" for the "Ok" and "Cancel" gadgets. You may
  925. activate the string gadget by pressing the Tab key.
  926.  
  927. Correcting Mistakes
  928. ===================
  929.  
  930. If you are recording a macro and you press Backspace to correct a
  931. typing error, the error and the backspace will be recorded. You may
  932. use Ctrl-H to correct a keystroke without recording the mistake or
  933. the backspace. Because of this feature, you cannot record Ctrl-H. If
  934. you need to, you may enter it as \Ch in the macro from SetMachIV. (If
  935. you are using a keymap that has "H" in a different location from the
  936. usa keymap, you must use the key that has the key code of 25 hex.)
  937.  
  938. Aborting Execution
  939. ==================
  940.  
  941. Pressing ESC during macro execution will abort further execution. An
  942. exception to this is when pausing for variable length input
  943. (PAU_VAR_INPUT""). In this case, press ESC to terminate input and
  944. Ctrl-ESC to abort the macro. See Chapter 6, Pausing Within A Macro.
  945.  
  946. Clearing A Macro
  947. ================
  948.  
  949. To clear a macro, that is, to free it from a hotkey, press Alt-ESC,
  950. then the hotkey, then Alt-ESC again. This records no keystrokes which
  951. means that the macro is empty and the hotkey is free. You may also
  952. clear macros using SetMachIV as will be explained in Chapter 5.
  953.  
  954. Accidents Happen!
  955. =================
  956.  
  957. If you should accidently press the Alt-ESC hotkey, the clock will
  958. display "Select A Hotkey...". Simply press Alt-ESC again. No harm
  959. done!
  960.  
  961. If you accidently press Alt-ESC and then more keys, the first key
  962. pressed after Alt-ESC will become a hotkey with the following keys
  963. the macro. You can press Alt-ESC again to stop recording. Then press
  964. Alt-ESC, then the "accidental" hotkey, then Alt-ESC again.
  965.  
  966.                                 - 15 -
  967.  
  968. Chapter 5                                  Using SetMachIV And Macros
  969. =====================================================================
  970.  
  971. The main window of SetMachIV is where you do most of the work with
  972. macros. Macros may be created, modified, copied or appended in this
  973. window.
  974.  
  975. You may also create new or delete additional configurations with the
  976. list gadget and the "Add" and "Del" gadgets located in the upper left
  977. corner. Using multiple configurations is discussed in Chapter 7.
  978.  
  979. Changing The Current Hotkey
  980. ===========================
  981.  
  982. The current Hotkey is displayed in the text box just under the
  983. "Select Hotkey" gadget. The qualifiers needed for this hotkey will be
  984. highlighted below and to the left. The actual macro will be displayed
  985. both in the "Macros" list box and in the string gadget underneath. If
  986. more than one macro is attached to a particular key, they will also
  987. be displayed in the list box. The macro's name, if any, will be
  988. displayed in both the "Macro Names" list box and the string gadget
  989. underneath.
  990.  
  991. It is important to note that the two list boxes are independant. A
  992. macro name and its associated macro may not be the same horizontally
  993. if you use the scroll gadgets on the side. They will, however, be
  994. directly opposite each other after you select a macro or hotkey.
  995.  
  996. To modify or delete a macro, you first must make that macro the
  997. current one. The simplest way is to click on "Select Hotkey" and then
  998. when prompted by the
  999.  
  1000.    "Press A Hotkey Combination"
  1001.  
  1002. message, press the desired hotkey. (If you want to make a mouse button
  1003. current, hold down your selected qualifier keys and click INSIDE the
  1004. message box.)
  1005.  
  1006. You may abort this step by pressing ESC. Because of this, you cannot
  1007. select ESC this way. If you want to select ESC, click on "Select
  1008. Hotkey" and press Ctrl-ESC or Shift-ESC (for example) and then click
  1009. on the qualifier gadgets until none are highlighted.
  1010.  
  1011. Also, because you rarely want a macro attached to the left mouse
  1012. button and because it is easy to accidently click it, you must select
  1013. it in a similar manner as for ESC.
  1014.  
  1015. You may step through all the keys that have macros one by one with
  1016. the up and down gadgets. These are located next to the Shift
  1017. qualifier gadget. Only the keys that have macros attached will be
  1018. displayed. You may also use the up and down arrow keys.
  1019.  
  1020.                                 - 16 -
  1021.  
  1022. If the macro is in the list box, you may click on it or on its name.
  1023. The macro will then be displayed in the string gadget and the
  1024. qualifiers for the hotkey will be highlighted.
  1025.  
  1026. You may also click on the qualifier gadgets to make a hotkey current.
  1027. If you select qualifiers that have no macro, the Macro string gadget
  1028. will be empty, ready to accept a new macro.
  1029.  
  1030. If you have a non-standard keyboard, additional keys will display
  1031. their keycode in the current hotkey gadget.
  1032.  
  1033. Selecting By Name
  1034. =================
  1035.  
  1036. The "Macro Names" list box displays a (possibly) descriptive name for
  1037. the macro.
  1038.  
  1039. If you want to display a macro by its name, click on "Select Named"
  1040. and select or enter the name in the list gadget that will pop up. The
  1041. string gadget may not be initially activated. You may activate it in
  1042. the normal way by clicking in it, or by pressing the Tab key.
  1043.  
  1044. You may also select a named macro by entering the name in the "Macro
  1045. Names" string gadget and pressing Shift-Return. Pressing just Return
  1046. will simply change the name of the current macro.
  1047.  
  1048. To display macros that are not attached to any key, click on "Select
  1049. Hotkey" and then press the Caps Lock key.
  1050.  
  1051. Modifying Macros
  1052. ================
  1053.  
  1054. Once that you have made the desired macro current, you may modify or
  1055. delete it, or copy or append it to another hotkey.
  1056.  
  1057. Click in the "Macro" string gadget to make your changes. Press
  1058. Right-Amiga-X or click on "Del Macro" to delete it.
  1059.  
  1060. To enter the example from Chapter 4, click on "Select Hotkey" and
  1061. then press Alt-D. Now enter "dir df0:\N" (with the quotes!) in the
  1062. "Macro" string gadget and press Return. That's it! "dir df0:<Return>"
  1063. will be played back when you press Alt-D. If you recorded the
  1064. previous example, the macro will already be there.
  1065.  
  1066. Copying And Appending
  1067. =====================
  1068.  
  1069. "Copy" will copy a macro from one hotkey to another and "Append" will
  1070. append a macro to another hotkey. First make the hotkey that you want
  1071. to copy or append FROM the current hotkey. Then select "Copy" or
  1072. "Append". When prompted by the flashing message, press the desired
  1073. hotkey combination that you want to copy or append to.
  1074.  
  1075.                                 - 17 -
  1076.  
  1077. To A Named Macro
  1078. ================
  1079.  
  1080. To copy or append to an unkeyed named macro, proceed as above but
  1081. press Caps Lock when prompted for a hotkey and then enter or select
  1082. the name from the list gadget that will appear.
  1083.  
  1084. To Another Configuration
  1085. ========================
  1086.  
  1087. Proceed as above but when the message is flashing, select the desired
  1088. configuration from the list box in the upper left corner of
  1089. SetMachIV, then select your hotkey.
  1090.  
  1091. ****** CAUTION! ******
  1092.  
  1093. Once the "Press A Hotkey Combination" message is flashing, any key
  1094. that you press will receive the macro...except ESC. Use this key to
  1095. abort. You cannot copy to the ESC key.
  1096.  
  1097. Add Macro
  1098. =========
  1099.  
  1100. Selecting "Add Macro" will prompt you to select a new hotkey unless
  1101. the NO KEY macros are being displayed. Again, you may use Caps Lock
  1102. to select a macro by name.
  1103.  
  1104. Del Macro
  1105. =========
  1106.  
  1107. Clicking on "Del Macro" will delete the current macro. This is the
  1108. same as clicking in the current macro string gadget and pressing
  1109. Right-Amiga-X and Return.
  1110.  
  1111. Maximum Macro Size
  1112. ==================
  1113.  
  1114. The default maximum macro size is 512 characters but this may be
  1115. changed in the "Buffer Size" gadget. This controls the size of
  1116. dynamic buffers which are allocated only during macro recording or
  1117. when SetMachIV is running. The actual macros take up only as much
  1118. space as they need plus a little bit of overhead. The maximum size
  1119. allowed is 32,767 characters. If you try to enter too small a size,
  1120. the minimum needed for your largest macro will be entered for you.
  1121.  
  1122. Note: If you are recording all mouse movements, you will need to set
  1123. the buffer size considerably higher than 512.
  1124.  
  1125. Curiosity note: Why 512? Why not 500? 512 is one half of 1024 which
  1126. is 1K. Programmers have a hard time shifting from bits, bytes and Ks
  1127. among other things.
  1128.  
  1129.                                 - 18 -
  1130.  
  1131. Help
  1132. ====
  1133.  
  1134. Clicking on "Help" (or pressing the "Help" key) will show all the
  1135. escaped characters and special functions that may be used in macros.
  1136. They are also listed in Appendices A and B.
  1137.  
  1138. Flags
  1139. =====
  1140.  
  1141. Macros may have four features attached to them that are selected from
  1142. the "Flags" window. Click on the "Flags" gadget to view or change
  1143. these flags.
  1144.  
  1145.   Write Protect  - When checked, you cannot record over the existing
  1146.                    macro. It may still be modified in SetMachIV. It
  1147.                    is a good idea to write protect macros like your
  1148.                    NewShell macro and the macro that starts and stops
  1149.                    recording. Hex representation - 0x80.
  1150.  
  1151.   Disabled       - When this flag is checked, the macro will not
  1152.                    execute and the key will be passed through to
  1153.                    other programs. Hex representation - 0x40.
  1154.  
  1155.   Temporary      - A hotkey may be marked as temporary by checking
  1156.                    this flag. When you save your settings file the
  1157.                    name and flags will be saved but not the macro. If
  1158.                    you commonly use particular keys for recording
  1159.                    "scratch" macros, it may be a good idea to mark
  1160.                    these as temporary. Hex representation - 0x20.
  1161.  
  1162.   Relative       - When this is checked, all mouse moves will be
  1163.                    relative to the active window. Mouse actions that
  1164.                    select icons should probably be recorded to a
  1165.                    macro that is marked as relative so that when
  1166.                    playing back the macro it will not matter where
  1167.                    you have placed the window containing the icons.
  1168.                    Hex representation - 0x10.
  1169.  
  1170. The "Clear All" and "Set All" gadgets in the "Flags" window will
  1171. clear or set the flags that are displayed for all macros in the
  1172. current configuration. You could check the "Write Protected" flag and
  1173. then click on "Set All". All macros would then be protected.
  1174.  
  1175. These may also be set with the macro function:
  1176.  
  1177.    MSC_SET_FLAGS"xx,name"
  1178.  
  1179. This actually toggles the state of the flag. If it is on, this will
  1180. set it. If it is off, this will clear it.
  1181.  
  1182. Examples:
  1183.  
  1184.    MSC_SET_FLAGS"40,StartStop"  Set the "Disabled" flag.
  1185.    MSC_SET_FLAGS"80,StartStop"  Set the "Write Protect" flag.
  1186.  
  1187.                                 - 19 -
  1188.  
  1189. Sorting
  1190. =======
  1191.  
  1192. If a key has just a few macros, it probably doesn't need to be
  1193. sorted. But if you have a large number of named macros, it is easier
  1194. to locate them if they are sorted.
  1195.  
  1196. First make the hotkey current (or NO KEY for unkeyed macros), select
  1197. "By Name" or "By Macro" and then click on "Do Sort".
  1198.  
  1199. Printing Your Macros
  1200. ====================
  1201.  
  1202. If you find that it is getting difficult to remember all your macros,
  1203. SetMachIV provides the ability to print them in a table format.
  1204.  
  1205. Click on "Print Macros". A small window will appear with three
  1206. gadgets. You can select to have the output sent to a window for
  1207. viewing, sent to your printer, or sent to a file for later editing.
  1208.  
  1209. When the desired destination has been selected, click on "Go". If you
  1210. have selected to have the output sent to a window, after each window
  1211. full of macros have been displayed, press <Return> to continue. Press
  1212. Ctrl-C or click on the close gadget to quit.
  1213.  
  1214. If you have more than one configuration, just the current one will be
  1215. printed. To print other configurations, make it active and then
  1216. select "Print Macros".
  1217.  
  1218.                                 - 20 -
  1219.  
  1220. Chapter 6                                           More About Macros
  1221. =====================================================================
  1222.  
  1223. ARexx Support
  1224. =============
  1225.  
  1226. Macros may be sent to MachIV from ARexx programs with the ARexx
  1227. command:
  1228.  
  1229.   address 'MACHIV' 'macro string'
  1230.  
  1231. MachIV will execute the macro just as if you pressed the hotkey.
  1232. No results are returned.
  1233.  
  1234.   address 'MACHIV' 'WIN_TO_FRONT"AppTitle" WIN_SIZE"AppTitle,500,50"'
  1235.  
  1236. Viewing A Macro
  1237. ===============
  1238.  
  1239. You can view a macro by executing the MAC_SHOW function in a macro.
  1240. This is Alt-Help in the sample MachIV.prefs file. You will be
  1241. prompted for a hotkey combination. Use the same macro to close the
  1242. window. This is useful if you feel the need to double check just what
  1243. a particular hotkey does before executing it.
  1244.  
  1245. Recording Mouse Button Clicks
  1246. =============================
  1247.  
  1248. Mouse button clicks may be recorded, or entered manually in the
  1249. "Macro" string gadget. When recording a button click, MachIV puts in
  1250. the mouse's position, which button it was and whether it was pressed
  1251. or released. For example:
  1252.  
  1253.    MOU_XY"155,075" MOU_LBD
  1254.  
  1255. When played back, the mouse will be moved to x = 155, y = 75 and a
  1256. left button down will be sent.
  1257.  
  1258. A PAU_SECONDS"nn" will be inserted for every nn seconds delay between
  1259. clicks. This will allow for menus to drop or requesters and windows
  1260. to open. You may adjust or delete them from your macro if desired.
  1261. You may manually enter tenths of a second such as PAU_SECONDS".4" or
  1262. PAU_SECONDS"1.6"
  1263.  
  1264. If you record just the left button, you might see something like this
  1265. for the macro:
  1266.  
  1267.    MOU_XY"155,075" MOU_LBD PAU_SECONDS"1" MOU_LBU
  1268.  
  1269. unless you moved the mouse between pressing and releasing the mouse
  1270. button, in which case the new x and y values would be entered before
  1271. the MOU_LBU.
  1272.  
  1273.                                 - 21 -
  1274.  
  1275. Recording All Moves
  1276. ===================
  1277.  
  1278. If you need all mouse movements recorded, for a painting
  1279. demonstration for example, you need to set the "Play Delay" value
  1280. (found in Mouse Features) somewhere between 1-99. These represent
  1281. delays of 50ths of a second between moves. 1 = 1/50, 2 = 2/50 etc.
  1282. This is needed during playback by many programs in order to keep up
  1283. with the movements.
  1284.  
  1285. Note that this value must be set to some positive number both BEFORE
  1286. recording and during playback. During playback, you may get
  1287. acceptable (although fast) results by setting "Play Delay" and
  1288. "Playback Priority" to 0. During recording, the clock message should
  1289. be "Recording Macro...ALL".
  1290.  
  1291. Recording all moves requires much more memory than you would normally
  1292. need. Use it only if you need to. You may also need to set a larger
  1293. value in "Buffer Size".
  1294.  
  1295. Recording Menu And Gadget Selections
  1296. ====================================
  1297.  
  1298. When a menu item has a subitem it may be neccessary to bring the
  1299. mouse down to the menu item, click the left button on it, then move
  1300. the mouse over the subitem and click the left button or release the
  1301. right button. Sometimes gadgets will not respond to a quick button
  1302. down/up. It may require a pause between the down and up.
  1303.  
  1304. Do not use a pause larger than one second after the right button is
  1305. pressed for a menu selection. The macro will stop executing.
  1306.  
  1307. For a better method, see the section on sending menu and gadget
  1308. messages directly to a program with the WIN_SEND_MENU,
  1309. WIN_SEND_GADGET_DOWN, WIN_SEND_GADGET_UP and WIN_SEND_CLOSE functions.
  1310.  
  1311. Final Notes On Recording
  1312. ========================
  1313.  
  1314. The mouse will be moved to the same position as when recorded which
  1315. may or may not be over the desired gadget or icon. See the Flags
  1316. section in Chapter 5 for relative movements.
  1317.  
  1318. If you are pressing a qualifier such as Shift, it (\S) will be placed
  1319. before a MOU_XY"xxx,yyy" and will affect the mouse movement and the
  1320. first click. e.g.
  1321.  
  1322. "\S" MOU_XY"330,122" MOU_LBD
  1323.  
  1324. Do not depend on the SunMouse to activate a window during play back.
  1325. When recording, click in the window to activate it, even if it is
  1326. activated by the SunMouse.
  1327.  
  1328.                                 - 22 -
  1329. Using Escaped Characters
  1330. ========================
  1331.  
  1332. All non-printable keys are preceded by a backslash "\". For example,
  1333. \B is the Backspace key, \H is the help key and \F3 is function key 3.
  1334.  
  1335. These qualifiers modify the key or mouse activity immediately
  1336. following them:
  1337.  
  1338.           \C Control.
  1339.           \S Shift (either one).
  1340.           \A Alternate (either one).
  1341.           \L Left-Amiga (C=).
  1342.           \R Right-Amiga.
  1343.  
  1344.    "\Cc\u\A\S\l"
  1345.  
  1346. This plays back the key combinations:
  1347.  
  1348.    Ctrl-c up-arrow and Alt-Shift-Left-Arrow
  1349.  
  1350. You do not need \S or \A before any character that is printable. For
  1351. example Alt-E displays the copyright symbol ©. You can press Alt-E
  1352. instead of entering \Ae.
  1353.  
  1354. Note that all escape characters must be used in the case as shown.
  1355.  
  1356. Also, the backslash itself and double quote marks must be preceeded
  1357. by a backslash. For example: "A backslash \\"  "A double quote \""
  1358.  
  1359. Functions in Macros
  1360. ===================
  1361.  
  1362. All special functions have the same basic format. They all begin
  1363. with a three letter mnemonic code followed by an underscore, followed
  1364. by the function. Any arguments to the function follow enclosed in
  1365. double quotes.
  1366.  
  1367. Many functions accept a single argument that is often optional. For
  1368. many WIN_ functions the argument specifies which window to apply the
  1369. function to. No argument indicates the top (front) window, a null
  1370. argument ("") indicates the active window while "title" will perform
  1371. the action on the window that has its title in the quotes.
  1372.  
  1373. When more than one argument is required and the first argument is a
  1374. window title, just inserting a comma will indicate the active window.
  1375. If you want the action applied to the top window, you will need to
  1376. first activate it with WIN_ACTIVATE with no argument.
  1377.  
  1378. As in quoted text, if you need a backslash \ or double quote ", you
  1379. must preceed it with a backslash. In argument strings, commas are
  1380. argument separators. You must also preceed them with a backslash it
  1381. they are not intended to separate arguments.
  1382.  
  1383. This is most frequently encountered in EXE_CMD functions. As an
  1384. example, you should use:
  1385.  
  1386.   EXE_CMD"echo >speak: \"time for lunch\, now!\""
  1387.  
  1388.  
  1389.                                 - 23 -
  1390.  
  1391. Identifying Labels And Comments
  1392. ===============================
  1393.  
  1394. For the purpose of identifying portions of your macro or for adding
  1395. comments, any text may be inserted most anywhere. Do not use double
  1396. quotes or underscore characters. For example:
  1397.  
  1398.    MOU_XY"167,134" MOU_LBD MOU_LBU  Mouse click on OPEN Gadget
  1399.  
  1400. Window Functions - WIN_
  1401. =======================
  1402.  
  1403. There are many window manipulation functions, most of which require
  1404. one or more arguments.
  1405.  
  1406. When using "title", you may preceed the title with the $ symbol to
  1407. activate a window based on the name of the program that owns it.
  1408. Example: WIN_ACTIVATE"$program". Use the program AllTitles to
  1409. determine the correct name to use, if there is one. This feature has
  1410. limitations, see the section Changing Configurations in Chapter 7.
  1411.  
  1412. Activating
  1413. ==========
  1414.  
  1415. WIN_ACTIVATE"title"   Activate the window by the title.
  1416. WIN_ACTIVATE""        Activate the window under the mouse.
  1417. WIN_ACTIVATE          Activate the top window.
  1418. WIN_ACTIVATE_NEXT     Activate the next window.
  1419.  
  1420. Depth Arranging
  1421. ===============
  1422.  
  1423. WIN_TO_FRONT"title"   Move the titled window to the front.
  1424. WIN_TO_FRONT""        Move the active window to the front.
  1425. WIN_TO_FRONT          Move the back window to the front.
  1426.  
  1427. WIN_TO_BACK"title"    Move the titled window to the back.
  1428. WIN_TO_BACK""         Move the active window to the back.
  1429. WIN_TO_BACK           Move the front window to the back.
  1430.  
  1431. WIN_BACK_TO_FRONT     Move the back window to the front.
  1432. WIN_FRONT_TO_BACK     Move the front window to the back.
  1433.  
  1434. Moving and Sizing
  1435. =================
  1436.  
  1437. WIN_MOVE"title,xxx,yyy"       Move titled window to xxx,yyy.
  1438.                               Use +0 to leave a position alone.
  1439. WIN_MOVE"title,+-xxx,+-yyy"   Move titled window + or - xxx yyy.
  1440. WIN_MOVE",xxx,yyy"            Move active window to xxx,yyy.
  1441. WIN_MOVE",+-xxx,+-yyy"        Move active window + or - xxx yyy
  1442.  
  1443. WIN_SIZE"title,xxx,yyy"       Size titled window to xxx,yyy.
  1444. WIN_SIZE"title,+-xxx,+-yyy"   Size titled window + or - xxx yyy.
  1445. WIN_SIZE",xxx,yyy"            Size active window to xxx,yyy.
  1446. WIN_SIZE",+-xxx,+-yyy"        Size active window + or - xxx yyy.
  1447.  
  1448.                                 - 24 -
  1449.  
  1450. When sizing, an omitted number is assumed to be 0, which will leave
  1451. that dimension unchanged. When moving, a 0 will move to the pixel
  1452. coordinate 0. If it is omitted, it will not move in that dirrection.
  1453. For example:
  1454.  
  1455.   WIN_MOVE",,200"     Will move the active window to the Y coordinate
  1456.                       200 and the X position will not change.
  1457.  
  1458.   WIN_MOVE",0,100"    Will move the active window to the Y coordinate
  1459.                       100 and to the X coordinate 0.
  1460.  
  1461.  
  1462. If the requested size is to large for the window's position, the
  1463. window will be moved. If it is to large for the screen, the screen
  1464. size will be used. Finally, if it is to small, it will be ignored.
  1465.  
  1466. So, to make a full sized window, it is safe to use:
  1467.  
  1468.   WIN_SIZE",1500,1500"
  1469.  
  1470.  
  1471. Organizing Windows
  1472. ==================
  1473.  
  1474. WIN_LAYER - Arrange all windows on a screen in layers.
  1475.             You'll need to try it to see what it actually
  1476.             does. See the function SET_NO_LAYER"title,...".
  1477.  
  1478.             The effect is something like this:
  1479.  
  1480.             ______________________________
  1481.             |*| Utilities______________@|@|
  1482.             |___________________________|_|
  1483.             |*| System_________________@|@|
  1484.             |___________________________|_|
  1485.             |*| Tools__________________@|@|
  1486.             |                           | |
  1487.             |                           | |
  1488.             |                           | |
  1489.             |___________________________| |
  1490.             |___________________________|/|
  1491.  
  1492. Simply put WIN_LAYER in a macro attached to a key combination like
  1493. Ctrl-Amiga-L.
  1494.  
  1495. Zooming Windows
  1496. ===============
  1497.  
  1498. You can send the mouse to the zoom gadget and have the left mouse
  1499. button pressed and released with WIN_ZOOM. This function assumes that
  1500. the zoom gadget is just to the left of the front/back gadget. This
  1501. function also sets the "Relative Flag" if it is not already set.
  1502.  
  1503. If there is no zoom gadget in the targeted window, the function is
  1504. ignored.
  1505.  
  1506.                                 - 25 -
  1507.  
  1508. Closing Windows
  1509. ===============
  1510.  
  1511. WIN_KILL  - Close the active window. This is NOT the same
  1512.             as clicking on the close gadget. It actually
  1513.             closes a window that may be owned by another
  1514.             program. This function is included to provide a
  1515.             way of closing an errant window that a program
  1516.             left behind. USE WITH CAUTION! MAY CAUSE A
  1517.             SYSTEM CRASH!
  1518.             A useful macro to use this with his:
  1519.  
  1520.             WIN_SELECT"Window To Kill?" WIN_KILL
  1521.  
  1522.             See "WIN_SEND_CLOSE"" to send a close message.
  1523.  
  1524. Sending IDCMP Messages
  1525. ======================
  1526.  
  1527. IDCMP messages (Intuition's Direct Communications Message Ports) are
  1528. the system's method of notifying a program that an event has taken
  1529. place. This event may be a close gadget, menu selection, key pressed
  1530. or released, or a gadget down or up message.
  1531.  
  1532. Many programs do not provide keyboard equivalents for menu selections.
  1533. With WIN_SEND_MENU",m,i,s", you can create your own!
  1534.  
  1535. You can send any IDCMP messages to any window that is able to receive
  1536. them. When a user clicks on the close gadget, for example, intuition
  1537. (part of the operating system) sends a special message to the program
  1538. that owns the window. The program then closes the window. MachIV can
  1539. also send these messages from macros. You may find it convenient to
  1540. create a close gadget macro attached to the hotkey Ctrl-Amiga-C or
  1541. Ctrl-Amiga-Q. Pressing this will then close the window.
  1542.  
  1543. You can easily send menu and gadget messages too. To send gadget
  1544. messages, you need to find out the desired gadget number. A program
  1545. called AllGadgets may be used to find these numbers. It must be run
  1546. from the shell while the window with the gadget in it is open.
  1547.  
  1548. Some programs need only the gadget up message while others need both
  1549. the down and up message. Some programs may also even need a pause
  1550. between the two.
  1551.  
  1552. Menu, menu item and menu subitem numbers start at 0. If you wish to
  1553. send a menu select message of the 2nd item in the 1st menu, you would
  1554. use the numbers 0,1.
  1555.  
  1556. In rare cases, the program that receives the message may not reply to
  1557. it and leave MachIV waiting forever. Simply press ESC.
  1558.  
  1559.                                 - 26 -
  1560.  
  1561. Window Message Examples
  1562. =======================
  1563.  
  1564. WIN_SEND_CLOSE
  1565.                 Send Close gadget message to front window.
  1566.  
  1567. WIN_SEND_CLOSE""
  1568.                 Send Close gadget message to active window.
  1569.  
  1570. WIN_SEND_CLOSE"title"
  1571.                 Send Close gadget message to titled window.
  1572.  
  1573. WIN_SEND_MENU"title,0,2,1"
  1574.                 Send a menu selection to titled window,
  1575.                 menu number 0, item number 2, subitem
  1576.                 number 1.
  1577.  
  1578. Note! Console windows that have a close gadget are not expecting a
  1579. normal intuition message and so cannot be closed with WIN_SEND_CLOSE.
  1580. A console window is a special type of window that uses the console
  1581. device instead of intuition for its input and output. Shell windows
  1582. and "Ed" are two examples.
  1583.  
  1584. Window Selecting
  1585. ================
  1586.  
  1587. WIN_SELECT      Select a window from a list box and make it active.
  1588.                 Uses the default list box title "Select A Window".
  1589.  
  1590. WIN_SELECT"List Box Title"
  1591.                 Select a window from a list box and make it active.
  1592.                 Enclose your desired title in quotes.
  1593.  
  1594. If a window does not have a title, a pointer to that window will be
  1595. displayed in hexidecimal form. e.g. 0x7c5e3d0. If there is only one
  1596. unnamed window then it's usually easy to know which it is. Some
  1597. windows may have a blank title. If you don't see the title or pointer
  1598. in the list, try clicking where one might be in the list.
  1599.  
  1600. Screen Functions - SCR_
  1601. =======================
  1602.  
  1603. The screen functions operate in a similar manner to the window
  1604. functions. You can bring screens to the front or send them to the
  1605. back, you can select a screen from a list which will bring it to the
  1606. front and you can close an errant screen (cautiously!).
  1607.  
  1608.  
  1609. SCR_BACK_TO_FRONT     - Send the back screen to the front.
  1610. SCR_TO_FRONT"title"   - Send titled screen to the front.
  1611.  
  1612. SCR_FRONT_TO_BACK     - Send front screen to the back.
  1613. SCR_TO_BACK"title"    - Send titled screen to the back.
  1614.  
  1615. SCR_WB_TO_FRONT       - Send Workbench screen to the front.
  1616. SCR_WB_TO_BACK        - Send Workbench screen to the back.
  1617.  
  1618.                                 - 27 -
  1619.  
  1620. SCR_SELECT            - Select a screen from a list box using the
  1621.                         default list box title "Selet A Screen".
  1622.                         Bring the screen to the front.
  1623. SCR_SELECT"List Box Title"
  1624.                       - Select a screen from a list box using the
  1625.                         quoted title as the list box title.
  1626.                         Bring the screen to the front.
  1627.                         A pointer to the screen is displayed if there
  1628.                         is no title.
  1629.  
  1630. SCR_KILL              - Request confirmation then close the front
  1631.                         screen. USE WITH CAUTION! Some programs
  1632.                         in some situations do not close their custom
  1633.                         screen when they terminate. This often
  1634.                         happens if the clock window is on it. With
  1635.                         this function, you can close it, but the
  1636.                         system may crash!
  1637.  
  1638. You can replace Workbench's standard combination Left-Amiga-N
  1639. with the macro SCR_BACK_TO_FRONT to bring the back screen (instead of
  1640. the Workbench screen) to the front. Replace Left-Amiga-M with
  1641. SCR_FRONT_TO_BACK. You can add WIN_ACTIVATE"" to these, which will
  1642. activate the window under the mouse after the screen is moved. Or use
  1643. WIN_ACTIVATE to activate the front window.
  1644.  
  1645. The macro might look like this:
  1646.  
  1647.    SCR_BACK_TO_FRONT WIN_ACTIVATE""
  1648.  
  1649. Pausing Within A Macro - PAU_
  1650. =============================
  1651.  
  1652. Sometimes it is neccessary to pause during macro execution. There are
  1653. three types of pauses; pause for 0.1 - 99 seconds, pause for fixed
  1654. length input, and pause for variable length input. Examples:
  1655.  
  1656. PAU_SECONDS"1"     Pause for one second.
  1657. PAU_SECONDS".3     Pause for .3 seconds.
  1658. PAU_SECONDS"2.5    Pause for 2.5 seconds.
  1659.  
  1660. PAU_FIX_INPUT"5"   Pause for five keystrokes.
  1661.  
  1662. PAU_VAR_INPUT      Pause for a variable number of keystrokes.
  1663.                    Terminate input with the ESC. To abort the macro
  1664.                    during input, press Ctrl-ESC.
  1665.  
  1666. PAU_VAR_INPUT"44"  Pause for a variable number of keystrokes. The
  1667.                    hex number "44" is optional. When supplied, it is
  1668.                    the keycode to use to terminate input. In this
  1669.                    case, it is the Return key. The default key is
  1670.                    ESC. To abort the macro during input, press
  1671.                    Ctrl-ESC.
  1672.  
  1673.                                 - 28 -
  1674.  
  1675. The input pause functions may be useful in data entry macros where
  1676. the macro performs some functions, waits for some user input, and
  1677. then continues with more functions. The macro may even call itself
  1678. over and over.
  1679.  
  1680. An easy way to setup such a macro would be to record a complete data
  1681. entry loop, and then, using SetMachIV, enter the pause in the
  1682. appropriate place.
  1683.  
  1684. A data entry macro might look like this:
  1685.  
  1686. MOU_XY"150,40" MOU_LBD MOU_LBU PAU_VAR_INPUT MOU_XY"460,23" MOU_LBD
  1687. MOU_LBU "\F1"
  1688.  
  1689. With this attached to the F1 key (for example), the mouse would click
  1690. at 150,40 (possibly a string gadget), wait for a variable number of
  1691. keystrokes followed by ESC, click at 460,23 (which might be a "Next"
  1692. gadget), and then execute F1 which would then cause it to repeat.
  1693.  
  1694. Graphics Functions - GFX_
  1695. =========================
  1696.  
  1697. An entire screen or a portion of it may printed using the macros:
  1698.  
  1699.    GFX_SCREEN_PRINT  and  GFX_CUT_PRINT
  1700.  
  1701. To print a screen, just make that screen the front one and execute
  1702. the macro. To cut a portion of a screen, execute the macro and then
  1703. using the mouse, press the left button and drag until the desired
  1704. area is outlined.
  1705.  
  1706. There are two options in "Clip Features" - "Center Print Image" and
  1707. "Print Full Page". The first is self-explanatory, the second, when
  1708. checked, will expand the graphic image to fill the page.
  1709.  
  1710. Like all macro functions, you may abort by pressing ESC.
  1711.  
  1712. Executing Functions - EXE_
  1713. ==========================
  1714.  
  1715. Macros may be automatically execution in several ways. Some use the
  1716. EXE_AUTO"" function and some execute based on the name of the macro.
  1717.  
  1718. Auto Execution Based On Time
  1719. ============================
  1720.  
  1721. The general form is this:
  1722.  
  1723. EXE_AUTO"hh:mm,mm-dd-yy"  or  EXE_AUTO"hh:mm,Day,Day,..."
  1724.  
  1725. The arguments of this macro are optional, but when supplied indicate
  1726. the time and possibly the date or day that you wish the macro to
  1727. execute. Normal AmigaDos wild cards are allowed.
  1728.  
  1729.                                 - 29 -
  1730. Examples:
  1731.  
  1732. EXE_AUTO"09:30"           Execute at 9:30 am.
  1733. EXE_AUTO"14:45"           Execute at 2:45 pm.
  1734. EXE_AUTO"??:15"           Execute every 15 minutes.
  1735. EXE_AUTO"08:45,01-22-92"  Execute at 8:45 am on January 22, 1991.
  1736. EXE_AUTO"19:00,??-10-??"  Execute at 7:00 pm on the 10th of the month.
  1737. EXE_AUTO"11:00,Mon,Sat"   Execute at 11:00 am every Monday and Saturday.
  1738. EXE_AUTO"12:00,Mon"       Execute at 12:00 noon every Monday.
  1739.  
  1740. EXE_AUTO""                Execute when MachIV is first run.
  1741.  
  1742. This function is used in combination with other functions. For example:
  1743.  
  1744. EXE_AUTO"??:15" MSC_BEEP    Will beep every 15 minutes.
  1745.  
  1746.  
  1747. EXE_AUTO"09:30,02-15-92" EXE_CMD"NewShell CON:220/50/200/50/Alarm"
  1748. "Call Joe" MSC_BEEP PAU_SECONDS"3" "\CxEndShell >nil:\N"
  1749.  
  1750. At 9:30 on 2-15-92, this will open a window in the center of the
  1751. screen, type the text "Call Joe", beep, pause 3 seconds, delete
  1752. (Ctrl-x) the text and end the CLI window. Note that text to be typed
  1753. is enclosed in double quotes.
  1754.  
  1755.  
  1756. EXE_AUTO"12:00" EXE_CMD"echo >speak: \"Lunch time. Why not take 2
  1757. hours?\""
  1758.  
  1759. Assuming that you have mounted the device speak:, at 12:00, speak the
  1760. quoted string. Note that double quotes within double quotes must be
  1761. preceeded by a backslash.
  1762.  
  1763. A popular combination of macros is this:
  1764.  
  1765. EXE_AUTO"??:15" MSC_BEEP
  1766.  
  1767. EXE_AUTO"??:30" MSC_BEEP PAU_SECONDS".5" MSC_BEEP
  1768.  
  1769. EXE_AUTO"??:45" MSC_BEEP PAU_SECONDS".5" MSC_BEEP PAU_SECONDS".5"
  1770.                 MSC_BEEP
  1771.  
  1772. EXE_AUTO"??:60" MSC_BEEP PAU_SECONDS".5" MSC_BEEP PAU_SECONDS"1"
  1773.                 MSC_BEEP PAU_SECONDS".5" MSC_BEEP
  1774.  
  1775. These will beep once at 15 after, twice on the half hour, three times
  1776. at three quarters after, and four times on the hour. These are 4
  1777. separate macros and may of course, be unkeyed.
  1778.  
  1779. If days are specified, they may be just long enough to match the day
  1780. that is displayed in the clock. That is, Tuesday, Tues, or even tu
  1781. will match Tuesday. Ranges are not supported. You must enter each
  1782. day.   EXE_AUTO"11:30,Mon,Tue,Wed,Thu,Fri"
  1783.  
  1784.                                 - 30 -
  1785.  
  1786. To enter these as unkeyed macros, click on "Select Hotkey" and press
  1787. Caps Lock when prompted. The current hotkey gadget should now show
  1788. "NO KEY" and all the qualifier gadgets should be disabled.
  1789.  
  1790. Now click on "Add Macro". The string gadget under the "Macros" list
  1791. box should be activated. Enter the first macro and press Return. The
  1792. macro should now be displayed in both the string gadget and in the
  1793. list box.
  1794.  
  1795. Click on "Add Macro" again and repeat these steps for the other three
  1796. macros.
  1797.  
  1798. Note that all macros that execute when MachIV is first run must be in
  1799. the first configuration.
  1800.  
  1801. Executing Programs
  1802. ==================
  1803.  
  1804. Many programs can be run from a hotkey by simply putting
  1805.  
  1806.    EXE_CMD"program"
  1807.  
  1808. in a macro. For example, EXE_CMD"run myapp" would run a program named
  1809. myapp. Usually, you would want to use Run in your command string to
  1810. keep from suspending MachIV during the application's execution.
  1811.  
  1812. The macro attached to Left-Amiga-ESC that opens a new shell is an
  1813. example of this kind of function.
  1814.  
  1815.    SCR_WB_TO_FRONT EXE_CMD"NewShell \"con:0/0/640/100/NewShell\""
  1816.  
  1817. This macro first brings the Workbench screen to the front and then
  1818. executes the NewShell program. Note that the double quotes within
  1819. double quotes must be preceeded by a backslash.
  1820.  
  1821. Programs executed this way will have the same stack size as it was
  1822. set when MachIV was first run. Many programs need a larger stack than
  1823. the default 4000. You should set the stack in your startup-sequence
  1824. to at least 10000. You can check a program's icon to see what the
  1825. recommended size is for that particular program.
  1826.  
  1827. If you need a comma in the quoted string, use \, otherwise it will be
  1828. treated as an argument separator.
  1829.  
  1830. Using Templates
  1831. ===============
  1832.  
  1833. Commonly used words and phrases may be automated by using the
  1834. MAC_FINISH function. If you often type "startup-sequence" for
  1835. example, you can create a macro "startup-sequence" (with the quotes)
  1836. with a name startup-seq. With MAC_FINISH attached to Left-Amiga-Space
  1837. bar, you could type: sta<Left-Amiga-Spacebar>
  1838. star<Left-Amiga-Spacebar>  or start<Left-Amiga-Spacebar>
  1839.  
  1840. The rest will be typed for you. MachIV will remember upto 12
  1841. characters and it resets its counter whenever you press a
  1842. non-printable key or the spacebar.
  1843.  
  1844.                                 - 31 -
  1845.  
  1846. Miscellaneous Functions - MSC_
  1847. ==============================
  1848.  
  1849. Changing Directories
  1850. ====================
  1851.  
  1852. Some programs require that you be in a specific directory before
  1853. executing the program. In these cases, you may temporarily change
  1854. directories with the MSC_CHG_DIR"path" function. For example:
  1855.  
  1856. MSC_CHG_DIR"dh0:games/arcade" EXE_CMD"Run SuperActionGame"
  1857.  
  1858. Changing Priorities Within A Macro
  1859. ==================================
  1860.  
  1861. Programs may be run at different priorities by temporarily changing
  1862. MachIV's priority within a macro by using
  1863.  
  1864.    MSC_PRORITY"nn"
  1865.  
  1866. Programs executed in the same macro after changing the priority will
  1867. have the new priority. After the macro is completed, the original
  1868. priority will be restored. An example:
  1869.  
  1870.    MSC_PRORITY"4" EXE_CMD"run myapplication"
  1871.  
  1872. The priority of myapplication will be 4.
  1873.  
  1874. Text Functions - TXT_
  1875. =====================
  1876.  
  1877. Sending Date and Time
  1878. =====================
  1879.  
  1880. Formats:
  1881.  
  1882. TXT_TIME_PASTE  or  TXT_TIME_PASTE"am,pm"
  1883. TXT_TIME_PRINT  or  TXT_TIME_PRINT"am,pm"
  1884. TXT_DATE_PASTE  or  TXT_DATE_PASTE"long"
  1885. TXT_DATE_PRINT  or  TXT_DATE_PRINT"long"
  1886.  
  1887. The current date or time may be sent as keystrokes to an application
  1888. by using one of the _PASTE functions or to the printer using one of
  1889. the _PRINT functions.
  1890.  
  1891. The optional time function arguments "am,pm" cause the argument text
  1892. to follow the time. If the time is before noon, the first argument
  1893. will be sent otherwise the second is sent. This text may be anything
  1894. upto 80 characters. The optional date function argument "long" will
  1895. cause the long form of the date to be used like: January 17, 1992.
  1896.  
  1897.   TXT_TIME_PASTE" ante meridiem, post meridiem"
  1898.  
  1899. The date format may be set in SetMachIV or with the function
  1900. SET_DATE_FORMAT"FMT". See the Clock chapter and the SET functions.
  1901.  
  1902.                                 - 32 -
  1903.  
  1904. The Set Functions - SET_
  1905. ========================
  1906.  
  1907. Some of MachIV's options may be set with the SET_ function. These
  1908. are usually used together with the EXE_AUTO"" function.
  1909.  
  1910.  
  1911. SET_SETMACHIV_PATH"path/file"   - Set the name and path to use to
  1912.                                   find SetMachIV.
  1913.  
  1914. SET_KEY"oldkey,newkey"         - Change a key to another. This is
  1915.                                  most often used for the middle mouse
  1916.                                  button, but it could be any key. Use
  1917.                                  the escape characters in Appendix B
  1918.                                  for special keys and use \ML, \MM
  1919.                                  and \MR for the mouse buttons.
  1920.                                  SET_KEY"\MM,\S"  Middle mouse button
  1921.                                  to Shift key.
  1922.                                  SET_KEY"\MM,\L"  Middle mouse button
  1923.                                  to Left-Amiga key.
  1924.                                  Only 1 key or button may be changed.
  1925.  
  1926. SET_MONTHS"month1,month2,..."  - Set the text to be used for month
  1927.                                  names. Optional. Defaults to English.
  1928.  
  1929. SET_DAYS"day1,day2,..."        - Set the text to be used for day names.
  1930.                                  The first day is Sunday. Optional.
  1931.                                  Defaults to English.
  1932.  
  1933. SET_DATE_FORMAT"FMT"           - Set date format. Defaults to USA.
  1934.                                  DOS File system format. 18-Feb-92
  1935.                                  INT International.      92-02-18
  1936.                                  USA United States.      02-18-92
  1937.                                  CDN Canadian.           18-02-92
  1938.  
  1939. SET_DATE_SEPARATOR"/"          - Set desired separator charactor.
  1940.                                  "-" is default. e.g. 01-01-92
  1941.  
  1942. SET_NO_LAYER"title1,title2..." - Set the titles of windows NOT to
  1943.                                  layer with WIN_LAYER. Maximum of 10
  1944.                                  titles with 10 characters each.
  1945.  
  1946. The German macros might look like these:
  1947.  
  1948. EXE_AUTO"" SET_MONTHS"Januar,Febuar,Marz,April,Mai,Juni,Juli,August,
  1949.                       September,Oktober,November,Dezember"
  1950.  
  1951. EXE_AUTO"" SET_DAYS"Sonntag,Montag,Dienstag,Mittwoch,Donnerstag,
  1952.                     Freitag,Samstag"
  1953.  
  1954.                                 - 33 -
  1955.  
  1956. Clipboard Functions - CLP_
  1957. ==========================
  1958.  
  1959. The clipboard is a special software device used by many applications.
  1960. When you perform a copy or paste in the application, it copies the
  1961. text to the clipboard. This text is then available both to the
  1962. application that copied or cut it and to any other application that
  1963. uses the clipboard.
  1964.  
  1965. MachIV has several functions that enhance this feature. You may view
  1966. the contents of the clipboard, paste it to an application's window
  1967. that does not support the clipboard, and you may print its contents.
  1968.  
  1969. The clipboard supports multiple buffers or "units", up to 256. All
  1970. functions have an optional argument that specifies the clipboard unit
  1971. to use. If you do not provide the argument, unit 0 or the last unit
  1972. selected will be used.
  1973.  
  1974.                               CLP_VIEW
  1975.                               CLP_VIEW"nnn"
  1976.  
  1977. Open a window and display the contents of the clipboard. From the
  1978. viewer window, the unit number may be changed by entering a number in
  1979. the string gadget, by clicking on the up/down gadgets, or by pressing
  1980. a key from "0" - "9". Re-read the clipboard by pressing the current
  1981. unit number. Close the view window with either the close gadget or by
  1982. pressing Return. Pause the display by pressing any other key. The
  1983. viewer window will automatically update itself when the contents of
  1984. the current unit have changed.
  1985.  
  1986. The view window may be kept opened if desired and zoomed to a large
  1987. or small size. MachIV will function normally while it is open.
  1988.  
  1989.                               CLP_PASTE
  1990.                               CLP_PASTE"nnn"
  1991.  
  1992. This function will paste the contents of the clipboard to the active
  1993. window. You would normally use this to paste to a window that does
  1994. not provide clipboard support, or to one that only supports unit #0
  1995. and you want to paste from a different unit. You can even paste to a
  1996. string gadget!
  1997.  
  1998. This function sends the text as keystrokes so it may not be very
  1999. speedy. The "Burst Chars" gadget in the "Clip Features" window may be
  2000. set as high as 80. Text is pasted using this setting only if "Append
  2001. Chars", "Prepend Chars" and "Char Delay" are set to null or 0. In
  2002. this case, only keypress down messages are sent. If your application
  2003. that is receiving the text needs keypress up messages also, set "Char
  2004. Burst" to 0.
  2005.  
  2006. The two strings in the gadgets "Prepend" and "Append" will be sent
  2007. before and after each line. The delay between characters and lines
  2008. sent are of interest mainly to telecommunication users. They are in
  2009. 50ths of a second.
  2010.  
  2011. You can remove linefeeds when pasting a paragraph by checking "Remove
  2012. Line Feeds" in SetMachIV and you can send both a return and line feed
  2013. for each line feed by checking "Line Feeds To CRLF".
  2014.  
  2015.                                 - 34 -
  2016.  
  2017.                               CLP_PRINT
  2018.                               CLP_PRINT"nnn"
  2019.  
  2020. This function will print the contents of the clipboard. Most word
  2021. processors provide this ability, but now you can print text from the
  2022. shell. In a shell, you can select text with the mouse and press
  2023. Right-Amiga-C to copy it to the clipboard. CLP_PRINT could then be
  2024. used to print it, or CLP_PASTE to paste it.
  2025.  
  2026. Notes:
  2027. ------
  2028.  
  2029. To abort printing or pasting, press ESC.
  2030.  
  2031. You can use multiple buffers when using an editor like Ed that uses
  2032. a console window. A set of macros (attached to perhaps the numeric
  2033. keypad) might be these:
  2034.  
  2035.   EXE_CMD"ConClip 0"
  2036.   EXE_CMD"ConClip 1"
  2037.   EXE_CMD"ConClip 2"
  2038.  
  2039. By executing one of these, you can quickly change which unit the
  2040. console copy and paste commands will use.
  2041.  
  2042. Currently, only text of the IFF type FTXT CHRS may be viewed. ILBM
  2043. support will be added later.
  2044.  
  2045. A copying to the clipboard function is not supported as that involves
  2046. a considerable amount of code for outline character recognition. If
  2047. you want that ability, use one of the "Snip", "Snap" or "OSnap" type
  2048. utilities.
  2049.  
  2050. Note that you can also print graphics with GFX_CUT_PRINT and
  2051. GFX_SCREEN_PRINT.
  2052.  
  2053.                                 - 35 -
  2054.  
  2055. Chapter 7                                              Configurations
  2056. =====================================================================
  2057.  
  2058.  
  2059. You may have more than one configuration within your MachIV.prefs
  2060. file.
  2061.  
  2062. Instead of having settings and macros for one application saved in
  2063. one file and other settings and macros saved in another file, they
  2064. can be combined into one file and can be made active simply by
  2065. clicking in a window.
  2066.  
  2067. Let's assume that you've set some macros attached to function keys
  2068. and other features that work well in a shell. Now you want to run an
  2069. application program such as WordPerfect which uses the function keys.
  2070. You could disable all macros while using WordPerfect, but there is
  2071. another alternative. You can add another configuration to the one
  2072. that you have already set up and modify it to work with WordPerfect.
  2073.  
  2074. To do this, select "Add" in SetMachIV. This will make a duplicate
  2075. configuration and number it 2. Clear your macros that are attached to
  2076. the function keys, if desired. Next in the string gadget under the
  2077. small list box to the left of "Add", type in " WordP" without the
  2078. quotes. (Notice the space before the WordP, that's like it is in the
  2079. title bar).
  2080.  
  2081. In your first configuration, you could type in the title AmigaShell
  2082. or whatever is in the title bar of your shell. Now, when you click in
  2083. a WordPerfect window, the second configuration becomes active. Click
  2084. in your shell window and its configuration becomes active.
  2085.  
  2086. If you are using the SunMouse feature you do not need to click in the
  2087. window - the configuration will become active when the window becomes
  2088. active. A configuration will also become active when you press any
  2089. key. For example, if you start an application which opens an active
  2090. window, the configuration will not become active until you do one of
  2091. the following:
  2092.  
  2093.   1. Click in the window.
  2094.   2. Press any key.
  2095.   3. Move the mouse (if the SunMouse is on).
  2096.  
  2097.  
  2098. Changing Configurations
  2099. =======================
  2100.  
  2101. You may have as many configurations as you like. Each one may be
  2102. attached to a window or screen through its title. The title need be
  2103. just long enough to uniquely match a window's title.
  2104.  
  2105. An "@" symbol as the first character will lock a configuration which
  2106. may then only be changed from SetMachIV or by executing a macro with
  2107. a CFG_ function such as CFG_NEXT. (see Appendix A). When a
  2108. configuration is changed from within a macro, there will be no
  2109. further execution of that macro.
  2110.  
  2111.                                 - 36 -
  2112.  
  2113. You may put in multiple window titles separated by a "|" vertical bar
  2114. (next to the Backspace key) such as "Ashell|TextEd| WordP" up to a
  2115. maximum of 40 characters. This example shows a configuration that
  2116. will become active when you click in a window titled Ashell, TextEd,
  2117. or  WordP.
  2118.  
  2119. When a new configuration is made active, its title will appear in the
  2120. clock for about one second.
  2121.  
  2122. If the clock is identical to the clock in the previously active
  2123. configuration, it will not be closed and reopened when configurations
  2124. are changed.
  2125.  
  2126. Default Configuration
  2127. =====================
  2128.  
  2129. The first configuration with no title will be activated when no title
  2130. matches. This means that you can set up a default configuration with
  2131. no title that will be active when you click in a window that does not
  2132. match any of your configuration titles.
  2133.  
  2134. Windows And Screens With No Title
  2135. =================================
  2136.  
  2137. Not all windows or screens have real titles. It may be just text
  2138. written where the title should be. MachIV cannot locate these titles
  2139. and thus cannot change to the proper configuration automatically. You
  2140. can manually change to these configurations with a CFG_NEXT or
  2141. CFG_CHANGE"title" macro.
  2142.  
  2143. Attaching To The Program's Name
  2144. ===============================
  2145.  
  2146. You may be able to change to untitled windows by specifying the
  2147. program's name. Do this by prefacing the program name with the "$"
  2148. symbol. For example: a configuration titled "$dh0:DPaint" will become
  2149. active when you click in the Deluxe Paint window. Unfortunately, not
  2150. all program names are accessible. Programs started from Workbench do
  2151. not have accessible names.
  2152.  
  2153. A program supplied with MachIV call AllTitles will list the window
  2154. and screen titles and program names that are useable. Simply type
  2155. AllTitles at the CLI prompt.
  2156.  
  2157. Adding And Deleting
  2158. ===================
  2159.  
  2160. "Add" duplicates the current configuration and then makes that one
  2161. current. You may then delete or modify macros and other settings in
  2162. the new configuration.
  2163.  
  2164. Delete a configuration with the "Del" gadget. You cannot delete the
  2165. last configuration.
  2166.  
  2167.                                 - 37 -
  2168. Loading And Saving
  2169. ==================
  2170.  
  2171. For any changes to be permanent, you just need to select "Save" or
  2172. "Save As..." from the "Project" menu. When MachIV is first run, it
  2173. looks for MachIV.prefs from the command line or Tool Types, then from
  2174. the current directory. If it is not found, it tries to load
  2175. ENVARC:MachIV/MachIV.prefs. You may save settings to other file
  2176. names, but only one of these two will be loaded automatically.
  2177.  
  2178. Select "Open..." from the "Project" menu to load other settings
  2179. files.
  2180.  
  2181. The Settings File
  2182. =================
  2183.  
  2184. This section describes the settings file itself. Most users will not
  2185. need to do anything to it.
  2186.  
  2187. The MachIV.prefs file is straight ASCII text and may be edited (but
  2188. does not need to be). Multiple configurations are all saved together
  2189. under one file name. Each configuration within this file must start
  2190. with ID=4.0. The specific order of everything else is not important.
  2191.  
  2192. Long lines are broken into smaller lengths (252 characters) and
  2193. terminated with a backslash. These allows some text editors that
  2194. cannot handle long lines to be used to edit a settings file.
  2195.  
  2196. Macros must be in the following format:
  2197.  
  2198.     Macro=qualifiers key{macroname}[XX]Macro body
  2199.  
  2200. The keys and qualifiers are identified in Appendix B. The name should
  2201. be no more than 12 characters. To enter no name use {}. The [XX] is
  2202. the hexidecimal repesentation of the selected flags.
  2203.  
  2204.  
  2205. Examples:
  2206. =========
  2207.  
  2208.       Macro=\Lj{WinToFront}[00]WIN_BACK_TO_FRONT
  2209.  
  2210. This is Left-Amiga-J Window to front hotkey.
  2211.  
  2212.       Macro=\L\E{NewShell}[80]SCR_WB_TO_FRONT EXE_CMD"NewShell
  2213.                               \"con:0/0/640/100/NewShell\""
  2214.  
  2215. This is Left-Amiga-ESC and executes a newshell command.
  2216.  
  2217.       Macro=\A\E{StartStop}[80]MAC_RECORD_KEYED
  2218.  
  2219. This is Alt-ESC and begins or ends a "recording to key" recording
  2220. session.
  2221.  
  2222.                                 - 38 -
  2223.  
  2224. Chapter 8                                      Miscellaneous Features
  2225. =====================================================================
  2226.  
  2227. These features are accessible from the "Miscellaneous Features"
  2228. window.
  2229.  
  2230. Priorities
  2231. ==========
  2232.  
  2233. All tasks in the Amiga's multitasking operating system run at a
  2234. particular priority. Higher priority tasks have higher numbers and
  2235. will run while tasks with lower priorities wait. Most user tasks run
  2236. at a priority of 0 and have an equal share of time. MachIV runs
  2237. well at 1. MachIV also has the ability to change its priority
  2238. temporarily while playing back a macro. A priority of 1 is usually ok
  2239. here too. You may experiment with these numbers and your particular
  2240. applications to find what works best. Don't try to set them very high
  2241. though, usually no more than 6 and certainly no more than 10. By
  2242. setting the "Playback Priority" to 0, the application and MachIV will
  2243. alternate between sending and receiving. The playback priority may
  2244. also be temporarily changed from a macro with MSC_PRIORITY. See
  2245. Appendix A.
  2246.  
  2247. Screen Blanking
  2248. ===============
  2249.  
  2250. After a preset length of time, you may have the screen either go
  2251. blank or just dim. If you select a dimness of 0 and have Check Waltz
  2252. on, there will be two dancing check marks on the blanked screen.  You
  2253. may adjust the tempo with the keys 1-9.
  2254.  
  2255. If you select a dimness value of 1-15, the front screen will go dim.
  2256. This uses no extra memory because it doesn't open a black screen.
  2257.  
  2258. The screen may also be blanked with MSC_BLANK_SCREEN in a macro.
  2259. Executing this macro will immediately blank the screen.
  2260.  
  2261. By selecting "Quick Blank" and setting some value for the "Mouse Off"
  2262. feature, the screen can be blanked when the mouse turns off by first
  2263. moving the mouse to the upper left corner.
  2264.  
  2265. Macro Screen Blanking
  2266. =====================
  2267.  
  2268. If you wish, you can execute a macro named "Blank" instead of
  2269. blanking the screen. With this feature, you could execute an
  2270. animation or anything else. In addition, you could send a message to
  2271. a custom screen blanker telling it to blank. The function
  2272. MSC_PUTMSG"xx,xx,xx" could be used for this. A sample screen blanking
  2273. program is included. This requires some knowledge of "C".
  2274.  
  2275. If a macro was executed instead of the normal screen blanking, a
  2276. macro named "Unblank" will execute when the user presses a key or
  2277. moves the mouse.
  2278.  
  2279.                                 - 39 -
  2280.  
  2281. A macro named "MachIVQuit" will execute when MachIV is terminated.
  2282. This could be used to send a message to a screen blanker telling it
  2283. to quit.
  2284.  
  2285. Suspend
  2286. =======
  2287.  
  2288. MachIV may be temporarily suspended by clicking on the Suspend
  2289. gadget. Or, you may create a macro that has a MSC_SUSPEND function.
  2290. Pressing the hotkey that this macro is attached to will either
  2291. suspend or activate MachIV.
  2292.  
  2293. Remove
  2294. ======
  2295.  
  2296. You can remove MachIV completely by clicking on "Remove MachIV".
  2297. MSC_QUIT in a macro may also be used. You may also remove MachIV by
  2298. running it again from your shell or double clicking on its icon. Yet
  2299. another way is to send it a "break" command or activate the clock and
  2300. press Ctrl-C.
  2301.  
  2302. Check Waltz
  2303. ===========
  2304.  
  2305. When you have selected 0 in "Blanking Dimness", and you have "Check
  2306. Waltz" on, screen blanking will include two dancing check marks. The
  2307. speed of these may be adjusted with the keys 1 to 9.
  2308.  
  2309. No Caps Lock
  2310. ============
  2311.  
  2312. Selecting "No Caps Lock" on will disable your Caps Lock key. It
  2313. actually may be still used by pressing Left-Amiga-CapsLock.
  2314.  
  2315. Beeping
  2316. =======
  2317.  
  2318. MachIV will beep to prompt you for certain actions, when you set an
  2319. alarm or when you execute a macro that has MSC_BEEP in it.
  2320.  
  2321. You can use a custom sound for MachIV's beep. Enter the name and
  2322. complete path of the sound file in the "Beep File Name" gadget. The
  2323. sound may be an IFF 8SVX sound file or a raw data file with the file
  2324. size in bytes 1 to 4 and the period value in bytes 5 and 6. Many
  2325. sound digitizing programs provide the ability to save in a "raw
  2326. format". Several samples of both are provided. The sound file should
  2327. be as small as possible. Less than 500 bytes is recommended although
  2328. you could use upto 3000 to 4000 byte files.
  2329.  
  2330. This sound is not the sound used when recording macros.
  2331.  
  2332. The sound is repeated 6 times for the alarm.
  2333.  
  2334. You may specify the number of beeps with MSC_BEEP"nn" such as:
  2335.  
  2336.   MSC_BEEP"1"   MSC_BEEP"4"
  2337.  
  2338.                                 - 40 -
  2339.  
  2340. Hold Qualifiers
  2341. ===============
  2342.  
  2343. If "Hold Qualifiers" is checked, you may press and release any
  2344. qualifier and it will be remembered and added to the next
  2345. non-qualifier key or mouse button. The "held" qualifiers will then be
  2346. released. See below for holding for multiple keystrokes.
  2347.  
  2348. Many disabled people find it difficult if not impossible to type key
  2349. combinations such as Ctrl-Shift-F1. So you could for example, press
  2350. Ctrl, Shift, and then F1. The Ctrl and Shift would be added to the F1
  2351. just as if they were pressed at the same time.
  2352.  
  2353. This feature is not intended for someone who doesn't need it as it
  2354. sometimes may cause unexpected results. For example, if you press
  2355. Alternate and then change your mind, the Alternate will still be
  2356. added to the next key pressed. Pressing Caps Lock or the right mouse
  2357. button will clear the qualifiers. Pressing a qualifier again will
  2358. clear that qualifier.
  2359.  
  2360. The first letter in the clock will change to a white (or whatever
  2361. color is used in pen 2) "A" when there are qualifiers accumulating.
  2362.  
  2363. Qualifiers may be held for multiple keystrokes if you first press
  2364. Alt-CapsLock.
  2365.  
  2366. This may also be used with Workbench's extended selection. Press the
  2367. Shift key, then click on your icons.
  2368.  
  2369. Press any non-qualifier key or the right mouse button to clear the
  2370. qualifiers that have been accumulating.
  2371.  
  2372. Debug
  2373. =====
  2374.  
  2375. With this feature checked, MachIV will be in the debugging mode. When
  2376. a macro is executed and for some reason fails, SetMachIV will be run
  2377. and the offending macro will be displayed with the cursor on the
  2378. function that failed.
  2379.  
  2380.  
  2381.                                 - 41 -
  2382.  
  2383. Appendix A                                          Special Functions
  2384. =====================================================================
  2385.  
  2386. Configuation Functions
  2387. =====================================================================
  2388.  
  2389. CFG_CHANGE"title"           Change to a configuration with the
  2390.                             title "title".
  2391. CFG_LOAD"path/filename"     Load a settings file.
  2392. CFG_NEXT                    Make the next configuration active.
  2393. CFG_SAVE"path/filename"     Save a settings file.
  2394.  
  2395. Clock Functions
  2396. =====================================================================
  2397.  
  2398. CLK_CUSTOM_MSG"Message"     Display a message in the clock. You could
  2399.                             combine this with another function to
  2400.                             tell you what happened. For example:
  2401.  
  2402.           SET_DATE_FORMAT"INT"  CLK_CUSTOM_MSG"Date format set."
  2403.  
  2404. CLK_ON_OFF                 Turn the clock on or off.
  2405. CLK_OFF                    Turn the clock off.
  2406. CLK_ON                     Turn the clock on.
  2407. CLK_TO_FRONT               Send the clock to the top screen.
  2408.  
  2409. Clipboard Functions
  2410. =====================================================================
  2411.  
  2412. All clipboard functions have an optional argument that specifies the
  2413. clipboard unit to use. If you do not provide the argument, unit 0 or
  2414. the last unit selected will be used.
  2415.  
  2416. CLP_VIEW                   Open a window and display the contents of
  2417. CLP_VIEW"nnn"              the clipboard.
  2418.  
  2419. CLP_PASTE                  Paste the contents of the clipboard to the
  2420. CLP_PASTE"nnn"             active window. You would normally use this
  2421.                            to paste to a window that does not provide
  2422.                            clipboard support, or to one that only
  2423.                            supports unit #0.
  2424.  
  2425. CLP_PRINT                  Print the contents of the clipboard.
  2426. CLP_PRINT"nnn"
  2427.  
  2428.                                 - 42 -
  2429.  
  2430. Execute Functions
  2431. =====================================================================
  2432.  
  2433. The standard AmigaDos wild cards ? and # may be used in these
  2434. arguments.
  2435.  
  2436. EXE_AUTO"hh:mm,mm-dd-yy"   Automatically execute a macro at a
  2437.                            specific time and date.
  2438. EXE_AUTO"hh:mm,day,..."    Execute at a specific time and day.
  2439. EXE_AUTO"hh:mm"            Automatically execute a macro at a
  2440.                            specific time.
  2441. EXE_AUTO""                 Execute when MachIV is first run.
  2442.  
  2443. Graphics Functions
  2444. =====================================================================
  2445.  
  2446. GFX_CUT_PRINT              Cut and print a graphic image.
  2447. GFX_CUT_PASTE              Cut and paste a graphic image. Abort
  2448.                            printing by pressing ESC.
  2449. GFX_CUT_SAVE               Cut and save a graphic image. (Not
  2450.                            implemented yet!)
  2451. GFX_SCREEN_PRINT           Print the entire screen. Abort
  2452.                            printing by pressing ESC.
  2453. GFX_SCREEN_SAVE            Save the entire screen. (Not
  2454.                            implemented yet!)
  2455.  
  2456. Maro Functions
  2457. =====================================================================
  2458.  
  2459. MAC_SELECT_NAMED"Title"   Open a list box to select a macro name from
  2460.                           and execute that macro. "Title" is
  2461.                           optional. It replaces the default "Select A
  2462.                           Name" title.
  2463. MAC_EXECUTE_NAMED"name"   Execute a macro named "name".
  2464. MAC_FINISH                Finish executing a macro based on
  2465.                           characters already typed that match the
  2466.                           macro's name.
  2467. MAC_ON_OFF                Turn macros on or off.
  2468. MAC_RECORD_KEYED          Start or stop recording to a hotkey.
  2469. MAC_RECORD_NAMED          Start or stop recording to named macro.
  2470. MAC_SHOW                  Show a macro.
  2471.  
  2472. Mouse Functions
  2473. =====================================================================
  2474.  
  2475. MOU_LBD                   Send a left button down.
  2476. MOU_LBU                   Send a left button up.
  2477. MOU_MBD                   Send a middle button down.
  2478. MOU_MBU                   Send a middle button up.
  2479. MOU_RBD                   Send a right button down.
  2480. MOU_RBU                   Send a right button up.
  2481. MOU_XY"xxx,yyy"           Move the mouse to xxx,yyy.
  2482. MOU_OFF"nn"               Set the "Mouse Off" seconds.
  2483. MOU_SPEED"nn"             Set the "Mouse Speed".
  2484. MOU_THRESHOLD"nn"         Set the "Mouse Threshold".
  2485. MOU_SUN                   Turn the "SunMouse" on or off.
  2486. MOU_TO_MENU               Turn "Mouse To Menu" on or off.
  2487.  
  2488.                                 - 43 -
  2489.  
  2490. Miscellaneous Functions
  2491. =====================================================================
  2492.  
  2493. MSC_BEEP"nn"              Sound an audible beep. Argument is optional.
  2494. MSC_BLANK_SCREEN          Blank the screen.
  2495. MSC_CHG_DIR"path"         Change directories.
  2496. MSC_HOLD_QUALS            Turn "Hold Qualifiers" on or off.
  2497. MSC_PRIORITY"nn"          Set the priority for the rest of the macro.
  2498. MSC_QUIT                  Terminate MachIV.
  2499. MSC_SET_FLAGS"xx,name"    Toggle the flags xx for macro "name".
  2500.                           80 = Write Protect, 40 = Disable,
  2501.                           20 = Temporary, 10 = Relative.
  2502. MSC_SUSPEND               Suspend MachIV.
  2503. MSC_SPEAK_ON_OFF          Turn the speaking of messages on or off.
  2504. MSC_PUTMSG"port,xx,xx,xx" Send a message to a message port.
  2505. MSC_DEBUG_ON_OFF          Turn debugging on or off.
  2506.  
  2507. Pause Functions
  2508. =====================================================================
  2509.  
  2510. PAU_SECONDS"n.n"          Pause for n.n seconds.
  2511. PAU_FIX_INPUT"nn"         Pause for nn keystrokes.
  2512. PAU_VAR_INPUT"xx"         Pause for variable number of keystrokes.
  2513.                           Optional "xx" is the hexidecimal code for
  2514.                           a terminating keycode. Default is ESC.
  2515.  
  2516. Screen Functions
  2517. =====================================================================
  2518.  
  2519. SCR_BACK_TO_FRONT         Send the back screen to the front.
  2520. SCR_TO_FRONT"title"       Send titled screen to the front.
  2521.  
  2522. SCR_FRONT_TO_BACK         Send front screen to the back.
  2523. SCR_TO_BACK"title"        Send titled screen to the back.
  2524.  
  2525. SCR_WB_TO_FRONT           Send Workbench screen to the front.
  2526. SCR_WB_TO_BACK            Send Workbench screen to the back.
  2527.  
  2528. SCR_SELECT                Select a screen from a list box using the
  2529.                           default list box title "Selet A Screen".
  2530.                           Bring the screen to the front.
  2531. SCR_SELECT"title"         Select a screen from a list box using the
  2532.                           quoted title as the list box title.
  2533.                           Bring the screen to the front.
  2534.  
  2535. SCR_KILL                  Request confirmation then close the front
  2536.                           screen. USE WITH CAUTION! Some programs
  2537.                           in some situations do not to close their
  2538.                           custom screen when they terminate. With
  2539.                           this function, you can close it, but the
  2540.                           system may crash!
  2541.  
  2542.                                 - 44 -
  2543.  
  2544. Set Functions
  2545. =====================================================================
  2546.  
  2547. SET_SETMACHIV_PATH"path/file"     Set the name and path to use find
  2548.                                   SetMachIV.
  2549.  
  2550. SET_MONTHS"month1,month2,..."    Set the text to be used for month
  2551.                                  names. Optional. Defaults to English.
  2552.  
  2553. SET_DAYS"day1,day2,..."          Set the text to be used for day
  2554.                                  names. The first day is Sunday.
  2555.                                  Optional. Defaults to English.
  2556.  
  2557. SET_DATE_FORMAT"FMT"             Set date format. Defaults to USA.
  2558.                                  May also be set in SetMachIV.
  2559.                                  DOS File system format. 18-Feb-92
  2560.                                  INT International.      92-02-18
  2561.                                  USA United States.      02-18-92
  2562.                                  CDN Canadian.           18-02-92
  2563.  
  2564. SET_DATE_SEPARATOR"/"            Set desired separator charactor.
  2565.                                  "-" is default. e.g. 01-01-92
  2566.                                  May also be set in SetMachIV.
  2567.  
  2568. SET_NO_LAYER"title1,title2..."   Set the titles of window NOT to layer
  2569.                                  with WIN_LAYER. Maximum of 10 titles.
  2570.                                  10 characters each.
  2571.  
  2572. SET_KEY"key,key"                 Set a key to another. Most often the
  2573.                                  middle button to the shift key.
  2574.                                  SET_KEY"\MM,\S"
  2575.  
  2576. Text Functions
  2577. =====================================================================
  2578.  
  2579. Use "long" to use the long form of the date.
  2580. Use "am,pm" to send the appropriate text with the time.
  2581.  
  2582. TXT_DATE_PASTE            Paste the current date.
  2583. TXT_DATE_PRINT            Print the date.
  2584. TXT_TIME_PASTE            Paste the time.
  2585. TXT_TIME_PRINT            Print the time.
  2586.  
  2587. Window Functions
  2588. =====================================================================
  2589.  
  2590. WIN_ACTIVATE"title"   Activate the window by the title.
  2591. WIN_ACTIVATE""        Activate the window under the mouse.
  2592. WIN_ACTIVATE          Activate the top window.
  2593. WIN_ACTIVATE_NEXT     Activate the next window.
  2594.  
  2595. WIN_TO_FRONT"title"   Move the titled window to the front.
  2596. WIN_TO_FRONT""        Move the active window to the front.
  2597. WIN_TO_FRONT          Move the back window to the front.
  2598.  
  2599. WIN_TO_BACK"title"    Move the titled window to the back.
  2600. WIN_TO_BACK""         Move the active window to the back.
  2601. WIN_TO_BACK           Move the front window to the back.
  2602.  
  2603.                                 - 45 -
  2604.  
  2605. WIN_BACK_TO_FRONT     Move the back window to the front.
  2606. WIN_FRONT_TO_BACK     Move the front window to the back.
  2607.  
  2608. WIN_MOVE"title,xxx,yyy"       Move titled window to xxx,yyy.
  2609.                               Use +0 to leave a position alone.
  2610. WIN_MOVE"title,+-xxx,+-yyy"   Move titled window + or - xxx yyy.
  2611. WIN_MOVE",xxx,yyy"            Move active window to xxx,yyy.
  2612. WIN_MOVE",+-xxx,+-yyy"        Move active window + or - xxx yyy
  2613.  
  2614. WIN_SIZE"title,xxx,yyy"       Size titled window to xxx,yyy.
  2615. WIN_SIZE"title,+-xxx,+-yyy"   Size titled window + or - xxx yyy.
  2616. WIN_SIZE",xxx,yyy"            Size active window to xxx,yyy.
  2617. WIN_SIZE",+-xxx,+-yyy"        Size active window + or - xxx yyy.
  2618.  
  2619. WIN_ZOOM"title"   Click the left mouse button over the zoom gadget of
  2620.                   the titled window.
  2621. WIN_ZOOM""        Click the left mouse button over the zoom gadget of
  2622.                   the active window.
  2623. WIN_ZOOM          Click the left mouse button over the zoom gadget of
  2624.                   the top window.
  2625.  
  2626. WIN_SEND_CLOSE            Send Close gadget message to front window.
  2627.  
  2628. WIN_SEND_CLOSE""          Send Close gadget message to active window.
  2629.  
  2630. WIN_SEND_CLOSE"title"     Send Close gadget message to titled window.
  2631.  
  2632. WIN_SEND_GADGET_DOWN",7"  Send gadget down message to active window
  2633.                           gadget number 7.
  2634.  
  2635. WIN_SEND_GADGET_DOWN"title,19"
  2636.                           Send gadget down message to titled window
  2637.                           gadget number 19.
  2638.  
  2639. WIN_SEND_GADGET_UP",34"   Send gadget up message to active window
  2640.                           gadget number 34.
  2641.  
  2642. WIN_SEND_GADGET_UP"title,g"
  2643.                           Send gadget up message to titled window
  2644.                           gadget number g.
  2645.  
  2646. WIN_SEND_MENU",m,i,s"     Send a menu selection to active window,
  2647.                           menu number m, item number i, subitem
  2648.                           number s (optional).
  2649.  
  2650. WIN_SEND_MENU"title,0,2,1"
  2651.                           Send a menu selection to titled window,
  2652.                           menu number 0, item number 2, subitem
  2653.                           number 1.
  2654.  
  2655. WIN_SEND_OTHER"title,xx,xx,xx"
  2656.                           Send any other IDCMP message to the titled
  2657.                           window. The 1st argument is the message
  2658.                           class, the 2nd is the code and the last is
  2659.                           the qualifier. All are in hex.
  2660.  
  2661.                                 - 46 -
  2662.  
  2663. WIN_SEND_OTHER",xx,xx,xx"
  2664.                           Send any other IDCMP message to the active
  2665.                           window.
  2666.  
  2667. WIN_SELECT                Select a window from a list box and make
  2668.                           it active. Use default list box title
  2669.                           "Select A Window".
  2670.  
  2671. WIN_SELECT"List Box Title"
  2672.                           Select a window from a list box and make
  2673.                           it active. Enclose your desired title in
  2674.                           quotes.
  2675.  
  2676.                                 - 47 -
  2677.  
  2678. Appendix B                                          Escape Characters
  2679. =====================================================================
  2680.  
  2681. Note that all are upper case except the arrow keys.
  2682.  
  2683. Function Keys
  2684. -------------
  2685.  
  2686. \F1  Function key 1    \F4  Function key 4   \F7  Function key 7
  2687. \F2  Function key 2    \F5  Function key 5   \F8  Function key 8
  2688. \F3  Function key 3    \F6  Function key 6   \F9  Function key 9
  2689.                                              \F10 Function key 10
  2690. Numeric Keypad Keys
  2691. -------------------
  2692.  
  2693. \1   Numeric Keypad 1  \4   Numeric Keypad 4  \7  Numeric Keypad 7
  2694. \2   Numeric Keypad 2  \5   Numeric Keypad 5  \8  Numeric Keypad 8
  2695. \3   Numeric Keypad 3  \6   Numeric Keypad 6  \9  Numeric Keypad 9
  2696.                                               \10 Numeric Keypad 10
  2697.  
  2698. \-  Numeric Keypad -             \*  Numeric Keypad *
  2699. \e  Numeric Keypad ENTER         \+  Numeric Keypad +
  2700. \(  Numeric Keypad (             \/  Numeric Keypad /
  2701. \)  Numeric Keypad )             \.  Numeric Keypad .
  2702.  
  2703. Other Special Keys
  2704. ------------------
  2705.  
  2706. \B  Backspace               \u  Up Arrow
  2707. \D  Delete                  \d  Down Arrow
  2708. \E  Escape                  \l  Left Arrow
  2709. \H  Help                    \r  Right Arrow
  2710. \N  Return (Newline)
  2711. \T  Tab
  2712. \\  Backslash
  2713.  
  2714. Qualifier Keys
  2715. --------------
  2716.  
  2717. \A  Alternate
  2718. \C  Control
  2719. \S  Shift
  2720. \L  Left Amiga
  2721. \R  Right Amiga
  2722.  
  2723.                                 - 48 -
  2724.  
  2725. Appendix C                                           Common Questions
  2726. =====================================================================
  2727.  
  2728.          Q. Why can't I close my CLI window after running MachIV?
  2729.  
  2730.          A. Use Run >nil: MachIV. This will allow the CLI window to
  2731.             close.
  2732.  
  2733.          Q. Why does MachIV seem to stop functioning after I run an
  2734.             application from a EXE_CMD"program" macro?
  2735.  
  2736.          A. Unless you use "Run" in the macro, MachIV will wait for
  2737.             the application to terminate. You should use something
  2738.             like EXE_CMD"Run MyProgram".
  2739.  
  2740.          Q. Why does my application crash when I run it from the
  2741.             NewShell or from an EXE_CMD""  macro?
  2742.  
  2743.          A. Programs executed with EXE_CMD (such as NewShell) will
  2744.             have a stack the size that was set when MachIV was run.
  2745.             These and ones that you may run from a new shell may need
  2746.             a larger stack. Either set the stack before running
  2747.             MachIV, or after you create a NewShell use the stack
  2748.             command to set your stack to a larger value. The default
  2749.             stack size is 4000. Many programs need 10000 or more.
  2750.  
  2751.          Q. Why does my EXE_CMD function return an error code?
  2752.  
  2753.          A. If you are trying to start a program from a macro and you
  2754.             have entered the command as you normally would type it
  2755.             from the shell, the problem is often embedded quotes,
  2756.             commas or backslashes. For example, use:
  2757.  
  2758.             EXE_CMD"echo >speak: \"time for lunch\, now!\""
  2759.  
  2760.             Not:
  2761.  
  2762.             EXE_CMD"echo >speak: "time for lunch, now!""
  2763.  
  2764.             An error code is also returned if the program cannot be
  2765.             found. It is often helpful to turn "Speak Messages"
  2766.             and "Debug" on when trying to locate these problems.
  2767.  
  2768.          Q. Why am I in the c: directory when I create a New Shell?
  2769.  
  2770.          A. MachIV's current directory is the one that was current
  2771.             when MachIV was run. If you bring up a New Shell and find
  2772.             yourself in the c: directory for example, it is because
  2773.             that was the current directory when MachIV was run. You
  2774.             probably did a "cd c:" somewhere before running MachIV.
  2775.  
  2776.                                 - 49 -
  2777.  
  2778.          Q. Why am I getting a Close Screen Vector message?
  2779.  
  2780.          A. The clock options "Any Screen" and "Top Screen" replace
  2781.             the CloseScreen vector with one that will allow MachIV
  2782.             to close its clock window. Selecting "WB Screen" or
  2783.             removing MachIV will put back the original vector. If
  2784.             another program also replaced the vector, you will be
  2785.             given the opportunity to terminate that program before
  2786.             the original vector is replaced. If you get a requester
  2787.             with the message Close Screen Vector Was Changed!, either
  2788.             terminate the program that changed the vector and click
  2789.             Retry or just click Cancel. If "WB Screen" is selected,
  2790.             the vector is not changed unless you have used the
  2791.             clipboard viewer on a custom screen.
  2792.  
  2793.          Q. How can I display only the total memory in the clock?
  2794.  
  2795.          A. You can fool the clock into displaying your total memory
  2796.             even if you have fast ram. In your startup-sequence, turn
  2797.             off your fast ram with a command like "NoFastMem", run
  2798.             MachIV, then run "NoFastMem" again.
  2799.  
  2800.                                 - 50 -
  2801.  
  2802. Appendix D                                      Graphic Print Options
  2803. =====================================================================
  2804.  
  2805. GRAPHIC PRINTING OPTIONS
  2806.  
  2807. You can follow GFX_SCREEN_PRINT and GFX_CUT_PRINT with some printing
  2808. options. They are:
  2809.  
  2810.    GFX_SCREEN_PRINT"x,y,w,h,c,r,xxx"
  2811.  
  2812.    and
  2813.  
  2814.    GFX_CUT_PRINT"c,r,xxx"
  2815.  
  2816. These all are decimal numbers except the last which is hex.
  2817.  
  2818. x   =   The horizontal pixel to start printing from. Not used in CUT.
  2819. y   =   The vertical pixel to start printing from. Not used in CUT.
  2820. w   =   The width of the graphic. Not used in CUT.
  2821. h   =   The height of the graphic. Not used in CUT.
  2822. c   =   Columns to be printed.
  2823. r   =   Rows to be printed.
  2824. xxx =   Special functions listed below.
  2825.  
  2826. SPECIAL_MILCOLS      001   c is specified in 1/1000"
  2827. SPECIAL_MILROWS      002   r is specified in 1/1000"
  2828. SPECIAL_FULLCOLS     004   make c maximum possible
  2829. SPECIAL_FULLROWS     008   make r maximum possible
  2830. SPECIAL_FRACCOLS     010   c is fraction of FULLCOLS
  2831. SPECIAL_FRACROWS     020   r is fraction of FULLROWS
  2832. SPECIAL_CENTER       040   center image on paper
  2833. SPECIAL_ASPECT       080   ensure correct aspect ratio
  2834. SPECIAL_DENSITY1     100   lowest resolution (dpi)
  2835. SPECIAL_DENSITY2     200   next res
  2836. SPECIAL_DENSITY3     300   next res
  2837. SPECIAL_DENSITY4     400   next res
  2838. SPECIAL_DENSITY5     500   next res
  2839. SPECIAL_DENSITY6     600   next res
  2840. SPECIAL_DENSITY7     700   highest res
  2841. SPECIAL_NOFORMFEED   800   don't eject paper on gfx prints
  2842.  
  2843. Special function overrides "Center Print Imiage" and "Print Full Page"
  2844. in "Clip Features".
  2845.  
  2846. Full screen examples:
  2847.  
  2848. GFX_SCREEN_PRINT",,,,0,0,0" Print full width with correct aspect.
  2849.                             Both a 320 or 640 wide screen will fill
  2850.                             the page.
  2851.  
  2852. GFX_SCREEN_PRINT"0,0,640,400,0,0,4"       Print using maximum columns.
  2853. GFX_SCREEN_PRINT"0,0,640,400,0,0,8"       Print using maximum rows.
  2854. GFX_SCREEN_PRINT"0,0,640,400,640,400,40"  Center the picture.
  2855. GFX_SCREEN_PRINT"0,0,640,400,,,80"        Use correct aspect.
  2856.  
  2857.                                 - 51 -
  2858.  
  2859. For clipped graphics, x,y, w,h are filled in for you when you clip
  2860. the graphic image. You may supply c, r and xxx.
  2861.  
  2862. GFX_CUT_PRINT"0,0,40"    Center clipped graphic.
  2863. GFX_CUT_PRINT"0,0,80"    Use correct aspect.
  2864. GFX_CUT_PRINT"0,0,C0"    Center clipped graphic and use correct aspect.
  2865.                          (80 + 40 = C0 in hex).
  2866. GFX_CUT_PRINT"0,0,84"    Print with maximum width possible.
  2867.  
  2868. GFX_CUT_PRINT"1000,500,103"  Print 1" wide, 1/2" tall, lowest density.
  2869.  
  2870.  
  2871. Examples (last option must be 0):
  2872.  
  2873. GFX_SCREEN_PRINT"0,0,320,200,640,400,0"   Source is 320x200 but print
  2874.                                           using 640x400.
  2875.  
  2876. GFX_SCREEN_PRINT"0,0,320,200,0,200,0"     Use maximum columns and 200
  2877.                                           rows.
  2878.  
  2879. GFX_SCREEN_PRINT"0,0,320,200,0,0,0"       Allow printer driver to
  2880.                                           determine aspect.
  2881.  
  2882. GFX_SCREEN_PRINT"0,0,320,200,320,0,0"     Use 320 columns and allow
  2883.                                           printer driver to determine
  2884.                                           rows.
  2885.  
  2886. GFX_CUT_PRINT"0,0,0"     Print graphic using the largest possible
  2887.                          size while maiintaining correct aspect
  2888.                          ratio.
  2889.  
  2890.  
  2891.                                 - 52 -
  2892.  
  2893. Appendix E                                         Some Useful Macros
  2894. =====================================================================
  2895.  
  2896. The following are some macros that you might find useful. The
  2897. suggested hotkeys may, of course, be changed to your own preferences.
  2898. ---------------------------------------------------------------------
  2899.  
  2900. Attach this to Ctrl-Amiga-A to send Workbench the Show All Files menu
  2901. selection.
  2902.  
  2903. WIN_SEND_MENU",1,7,1"
  2904. ---------------------------------------------------------------------
  2905.  
  2906. Attach this to Ctrl-Amiga-Q to close the active window.
  2907.  
  2908. WIN_SEND_CLOSE""
  2909. ---------------------------------------------------------------------
  2910.  
  2911. Attach this to an easy to remeber key to start your word processor.
  2912.  
  2913. MSC_CHG_DIR"dh1:FinalCopy" EXE_CMD"Run FinalCopy -cl"
  2914. ---------------------------------------------------------------------
  2915.  
  2916. C programmers might like this attached to Left-Amiga-F.
  2917.  
  2918. "for (i=;i<;i++) {\l\l\l\l\l\l\l\l\l\l"
  2919.  
  2920. And this attached to Left-Amiga-P.
  2921.  
  2922. "printf(\"\n\" );\l\l\l\l\l\l"
  2923.  
  2924. This will output a commented $VER: statement.
  2925.  
  2926. "/* $VER: ()\l" set_date_separator"." txt_date_paste
  2927. set_date_separator"-" "\r\N *\N*/\u\u\S\r\S\u\r\r\r\r"
  2928.  
  2929. It will look like this: (with cursor before the (01.01.92))
  2930.  
  2931. /* $VER:  (01.01.92)
  2932.  *
  2933.  */
  2934.  
  2935. (Use SET_DATE_FORMAT"CDN" to output dd.mm.yy instead of mm.dd.yy)
  2936. ---------------------------------------------------------------------
  2937.  
  2938. Give this a name of 640x200 and execute it by name to change
  2939. screenmode and overscan. (This is all one macro)
  2940.  
  2941. EXE_CMD"overscan sys:prefs/presets/overscan640x240.prefs use"
  2942. EXE_CMD"screenmode sys:prefs/presets/screenmode640x240.prefs use"
  2943. ---------------------------------------------------------------------
  2944.  
  2945. Name this "Kill Screen". CAUTION! This will crash unless the screen is
  2946. REALLY lonely.
  2947.  
  2948. SCR_SELECT"Screen To Kill?" SCR_KILL
  2949.